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

Swagger vs REST API: Interface.wireless_lans array #14982

Closed
janhlavin opened this issue Jan 30, 2024 · 4 comments · Fixed by #15037
Closed

Swagger vs REST API: Interface.wireless_lans array #14982

janhlavin opened this issue Jan 30, 2024 · 4 comments · Fixed by #15037
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@janhlavin
Copy link

janhlavin commented Jan 30, 2024

Deployment Type

Self-hosted

NetBox Version

v3.7.1

Python Version

3.11

Steps to Reproduce

  1. create wireless lan
  2. create device with interface
  3. associate wireless lan to interface

Expected Behavior

items in Interface.wireless_lans collection of WirelessLAN object in Swagger schema

Observed Behavior

items in Interface.wireless_lans collection of number in Swagger schema, but REST API return WirelessLAN objects

@janhlavin janhlavin added the type: bug A confirmed report of unexpected behavior in the application label Jan 30, 2024
@DanSheps DanSheps added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available labels Jan 31, 2024
@Smixi
Copy link
Contributor

Smixi commented Feb 4, 2024

Hi, I made some investigation. All fields using SerializedPKRelatedField are correctly represented for the request, but doesn't use the serializer for response, this is because they are represented by drf-spectacular with the PrimaryKeyRelatedField. I can make a PR so it uses the same method described here : tfranzel/drf-spectacular#778

@abhi1693 abhi1693 added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Feb 4, 2024
@Smixi
Copy link
Contributor

Smixi commented Mar 24, 2024

Hi @abhi1693, do you have news ? I think the PR is ready if its ok for you

@abhi1693
Copy link
Member

Looks like there is another PR #15449 that solves a similar issue.

@Smixi
Copy link
Contributor

Smixi commented Mar 26, 2024

Arf, it got duplicated. Did the other PR works ? I checked but it seems it doesn't looks for the direction value to use int for request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants