-
Bug
-
Resolution: Done
-
Medium
-
None
Logic of BaseYangOpenApiGenerator#addPaths creates an invalid schema for models which contain lists with nested containers. We don't have the required path parameters according to the declared parameters in the request.
The error:
Semantic error at paths./rests/data/aaa-cert-mdsal:key-stores/ssl-data={bundle-name}/trust-keystoreDeclared path parameter "bundle-name" needs to be defined as a path parameter at either the path or operation level
The corresponding fragment:
/rests/data/aaa-cert-mdsal:key-stores/ssl-data={bundle-name}/trust-keystore: patch: description: '' summary: PATCH - aaa-cert-mdsal - trust-keystore tags: - controller aaa-cert-mdsal requestBody: content: application/yang-data+json: schema: $ref: '#/components/schemas/aaa-cert-mdsal_key-stores_ssl-data_config_trust-keystore_TOP' application/yang-data+xml: schema: $ref: '#/components/schemas/aaa-cert-mdsal_key-stores_ssl-data_config_trust-keystore' description: trust-keystore_config parameters: [] responses: '200': description: OK '204': description: Updated
The full schema can be seen when you insert the content of http://localhost:8181/apidoc/openapi3/apis/single into https://editor.swagger.io/
- blocks
-
NETCONF-996 OpenAPI: Fix invalid swagger schema
- Resolved