mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
56 lines
922 B
JavaScript
56 lines
922 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 = [
|
|
'properties',
|
|
'value'
|
|
],
|
|
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
|
|
}
|
|
};
|