Files
fastapi-openapi-to-postman/lib/bundleRules/spec30.js
Erik Mendoza 183bc1eb27 Refactor rule resolver 3.0 and 3.1
- Moving each bundling version rules to new files
- Removing componentsParentMatcher files
- Replacing the getKeyInComponents for each version by a generalized one
- Adding a method to get the version bundling data by version
- Replacing the new sources in files
2022-06-16 00:41:49 -05:00

53 lines
889 B
JavaScript

const SCHEMA_CONTAINERS = [
'allOf',
'oneOf',
'anyOf',
'not',
'additionalProperties',
'items',
'schema'
],
EXAMPLE_CONTAINERS = [
'example'
],
REQUEST_BODY_CONTAINER = [
'requestBody'
],
CONTAINERS = {
schemas: SCHEMA_CONTAINERS,
examples: EXAMPLE_CONTAINERS,
requestBodies: REQUEST_BODY_CONTAINER
},
DEFINITIONS = {
headers: 'headers',
responses: 'responses',
callbacks: 'callbacks',
properties: 'schemas',
links: 'links'
},
INLINE = [],
ROOT_CONTAINERS_KEYS = [
'components'
],
COMPONENTS_KEYS = [
'schemas',
'responses',
'parameters',
'examples',
'requestBodies',
'headers',
'securitySchemes',
'links',
'callbacks'
];
module.exports = {
RULES_30: {
CONTAINERS,
DEFINITIONS,
COMPONENTS_KEYS,
INLINE,
ROOT_CONTAINERS_KEYS
}
};