The added/updated routes
import routing from '@novice1/routing';
import { Postman } from '@novice1/api-doc-generator';
const router = routing().post(...);
const postman = new Postman();
const routes = postman.add(router.getMeta());
const { path, method, schema } = routes[0];
remove all routes
The removed routes
Example:
postman.setAuth({
type: 'basic',
basic: []
});
Example:
postman.setAuth('basic', []);
Optional
auth: AuthAttribute[]Example:
import {
BasicAuthUtil
} from '@novice1/api-doc-generator';
const basicAuth = new BasicAuthUtil('basicAuth');
postman.setAuth(basicAuth);
Example:
import {
BasicAuthUtil
} from '@novice1/api-doc-generator';
const basicAuth = new BasicAuthUtil('basicAuthName');
postman.setDefaultSecurity(basicAuth);
Example:
postman.setDefaultSecurity({
type: 'basic',
basic: []
});
Example:
postman.setDefaultSecurity('basic');
Postman collection generator.
Note
For now it is not possible to only send files outside of object property (multipart). Well, at least not tried yet but it definitely doesn't work with alternatives