We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to OpenAPI 3.0 Specification, the field "examples" should be a map.
Example:
examples: foo: summary: A foo example value: {"foo": "bar"} bar: summary: A bar example value: {"bar": "baz"}
However, in the current implementation of this plugin, it is implemented as an array.
Ref: In serverless-openapi/src/DefinitionGenerator.ts
serverless-openapi/src/DefinitionGenerator.ts
if (parameter.example) { parameterConfig.example = parameter.example; // BELOW (Line 227) } else if (parameter.examples && Array.isArray(parameter.examples)) { // ABOVE (Line 227) parameterConfig.examples = parameter.examples; }
private attachExamples(target, config) { // BELOW (Line 307) if (target.examples && Array.isArray(target.examples)) { // ABOVE (Line 307) _.merge(config, { examples: _.cloneDeep(target.examples) }); } else if (target.example) { _.merge(config, { example: _.cloneDeep(target.example) }); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
According to OpenAPI 3.0 Specification,
the field "examples" should be a map.
Example:
However, in the current implementation of this plugin, it is implemented as an array.
Ref:
In
serverless-openapi/src/DefinitionGenerator.ts
The text was updated successfully, but these errors were encountered: