Skip to content

Commit 106ceb1

Browse files
authored
Add support for yang-data+json content type
Fix error ``` WARNING parsing GET /restconf/data/ietf-snmp:snmp within ietf_snmp. Cannot parse response for status code 200 (Unsupported content_type {'application/yang-data+json': MediaType(media_type_schema=Reference(ref='#/components/schemas/get_ietf_snmp_snmp'), example=None, examples=None, encoding=None)}), response will be ommitted from generated client ``` When using SONiC OS REST OpenAPI.
1 parent 17373e0 commit 106ceb1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

openapi_python_client/parser/responses.py

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Response:
2525
"application/json": "response.json()",
2626
"application/vnd.api+json": "response.json()",
2727
"application/octet-stream": "response.content",
28+
"application/yang-data+json": "response.json()",
2829
"text/html": "response.text",
2930
}
3031

0 commit comments

Comments
 (0)