[NETCONF-1022] OpenApi: Missing required parameters in swagger schema Created: 10/May/23 Updated: 31/May/23 Resolved: 31/May/23 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-openapi |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0, 4.0.7, 5.0.7 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Yaroslav Lastivka | Assignee: | Yaroslav Lastivka |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| 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.
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/
|