[NETCONF-1179] OpenApi Remove processModule method from DefinitionGenerator Created: 06/Oct/23 Updated: 02/Nov/23 Resolved: 02/Nov/23 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-openapi |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0, 4.0.9, 6.0.5, 5.0.10 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Peter Suna | Assignee: | Oleksandr Zharov |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The `processModule` method is invoked only when a specific single model is requested directly, using the following URL: However, this method generates a POST request with an incorrect payload, resulting in a 500 error response with the following message: This issue is caused by writing two resources at the same time. "/rests/data/network-topology:network-topology/topology=topology-netconf/node=36001-sim-device/yang-ext:mount": { "post": { "requestBody": { "description": "second-test-containers_module", "content": { "application/xml": { "schema": { "$ref": "#/components/schemas/second-test-containers_module" } }, "application/json": { "schema": { "$ref": "#/components/schemas/second-test-containers_module" } } } }, "responses": { "201": { "description": "Created" } } } } "second-test-containers_module": { "required": [ "foo", "bar" ], "properties": { "foo": { "$ref": "#/components/schemas/second-test-containers_foo" }, "bar": { "$ref": "#/components/schemas/second-test-containers_bar" } }, "description": "", "title": "second-test-containers_module", "type": "object" } So there is no need to create a schema "second-test-containers_module". Instead, use the first container in the model in the POST reference. In this case, "second-test-containers_foo". |