Missing serializer for LinkPeer
NetBox version
v3.3.2
Python version
3.10
Steps to Reproduce
- Download the OpenAPI schema from http://demo.netbox.dev/api/docs/?format=openapi
- Investigate the Schema for CircuitTermination.
Expected Behavior
The Schema should include a NestedLinkPeer representation including its attributes.
Observed Behavior
Instead it seems there is some kind of dummy in the schema.
"title": "Link peer",
"description": "\nReturn the appropriate serializer for the link termination model.\n",
"type": "object",
"additionalProperties": {
"type": "string",
"x-nullable": true
},
"readOnly": true
The same thing applies to several other models (I think all that can have link peers).
I went searching through the code but unfortunately do not understand the details of the automatically generated schema. I would love to get this fixed as it currently requires me to fix the generated code manually and updates are very hard in this way. Let me know if I can be of any help here.
Can you point me in the right direction so I can take a look myself? Is there any documentation for the automatic OpenAPI schema generation NetBox is using under the hood?
marking as blocked for #9608 see: https://stackoverflow.com/questions/36576447/swagger-specify-two-responses-with-same-code-based-on-optional-parameter This isn't really a dummy return, there is no NestedLinkPeer model, the return can be one of a couple different types, but OpenAPI 2 doesn't look like it can support this. OpenAPI 3 does have a convention for this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.
This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.