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/OpenAPI mismatch with returned data for cable terminations. #4804

Closed
clienthax opened this issue Jun 30, 2020 · 2 comments
Closed

Swagger/OpenAPI mismatch with returned data for cable terminations. #4804

clienthax opened this issue Jun 30, 2020 · 2 comments
Labels
pending closure Requires immediate attention to avoid being closed for inactivity status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@clienthax
Copy link

Environment

  • Python version: netbox-docker
  • NetBox version: 2.8.6

Steps to Reproduce

  1. Generate go-netbox with latest swagger https://github.com/netbox-community/go-netbox
  2. Create 2x device with cable connection between them
  3. Query for data with Dcim.DcimCablesList

Expected Behavior

Swagger to match returned data.

Observed Behavior

json: cannot unmarshal number into Go struct field Cable.results.termination_a of type string

WritableCable/cable refers to them as an object of type string, instead of the correct type

        "termination_a": {
          "title": "Termination a",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "readOnly": true
        },

Returned data (sanitized)

      "termination_a": {
        "id": 3505,
        "url": "http://XXXXXXXXXXXXXXXXXX/api/dcim/interfaces/3505/",
        "device": {
          "id": 60,
          "url": "http://XXXXXXXXXXXXXXXXXX/api/dcim/devices/60/",
          "name": "XXXXXXXXXXXXXXXXXX",
          "display_name": "XXXXXXXXXXXXXXXXXX"
        },
        "name": "XXXXXXXXXXXXXXXXXX",
        "cable": 98,
        "connection_status": {
          "value": true,
          "label": "Connected"
        }
      },
clienthax added a commit to clienthax/go-netbox that referenced this issue Jul 1, 2020
@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: bug A confirmed report of unexpected behavior in the application labels Jul 1, 2020
@stale
Copy link

stale bot commented Jul 15, 2020

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. Please see our contributing guide.

@stale stale bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Jul 15, 2020
@stale
Copy link

stale bot commented Jul 22, 2020

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.

@stale stale bot closed this as completed Jul 22, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2020
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 status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants