Details
-
Bug
-
Status: Resolved
-
Medium
-
Resolution: Done
-
None
Description
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/
Attachments
Issue Links
- blocks
-
NETCONF-996 OpenAPI: Fix invalid swagger schema
-
- Resolved
-
| # | Subject | Branch | Project | Status | CR | V |
|---|---|---|---|---|---|---|
| 106141,4 | Missed required parameters in swagger schema | master | netconf | Status: MERGED | +2 | +1 |
| 106246,2 | Missed required parameters in swagger schema | 5.0.x | netconf | Status: ABANDONED | 0 | 0 |
| 106255,2 | Missed required parameters in swagger schema | 4.0.x | netconf | Status: ABANDONED | 0 | 0 |
| 106264,2 | Missed required parameters in swagger schema | 4.0.x | netconf | Status: MERGED | +2 | +1 |
| 106265,2 | Missed required parameters in swagger schema | 5.0.x | netconf | Status: MERGED | +2 | +1 |