Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing serializer for LinkPeer #10308

Closed
tobikris opened this issue Sep 9, 2022 · 4 comments
Closed

Missing serializer for LinkPeer #10308

tobikris opened this issue Sep 9, 2022 · 4 comments
Labels
pending closure Requires immediate attention to avoid being closed for inactivity severity: low Does not significantly disrupt application functionality, or a workaround is available status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation topic: OpenAPI type: bug A confirmed report of unexpected behavior in the application

Comments

@tobikris
Copy link

tobikris commented Sep 9, 2022

NetBox version

v3.3.2

Python version

3.10

Steps to Reproduce

  1. Download the OpenAPI schema from http://demo.netbox.dev/api/docs/\?format\=openapi
  2. 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.

@tobikris tobikris added the type: bug A confirmed report of unexpected behavior in the application label Sep 9, 2022
@jeremystretch jeremystretch added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Sep 12, 2022
@tobikris
Copy link
Author

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?

@arthanson arthanson self-assigned this Oct 18, 2022
@arthanson arthanson added the status: blocked Another issue or external requirement is preventing implementation label Oct 28, 2022
@arthanson
Copy link
Collaborator

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.

@arthanson arthanson removed their assignment Oct 31, 2022
@jeremystretch jeremystretch removed the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Nov 17, 2022
@arthanson arthanson self-assigned this Mar 22, 2023
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: blocked Another issue or external requirement is preventing implementation labels Apr 7, 2023
@arthanson arthanson added topic: OpenAPI status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Apr 24, 2023
@arthanson arthanson removed their assignment Apr 24, 2023
@jeremystretch jeremystretch removed the status: accepted This issue has been accepted for implementation label May 2, 2023
@jeremystretch jeremystretch added the severity: low Does not significantly disrupt application functionality, or a workaround is available label Jun 23, 2023
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Sep 22, 2023
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pending closure Requires immediate attention to avoid being closed for inactivity severity: low Does not significantly disrupt application functionality, or a workaround is available status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation topic: OpenAPI type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants