Skip to content

fix(netbox): correct security scheme naming and servers/paths structure - #45

Merged
michaelelrom merged 3 commits into
itential:mainfrom
jennlu330:fix/netbox-3.7.8-security-scheme
Jul 27, 2026
Merged

fix(netbox): correct security scheme naming and servers/paths structure#45
michaelelrom merged 3 commits into
itential:mainfrom
jennlu330:fix/netbox-3.7.8-security-scheme

Conversation

@jennlu330

Copy link
Copy Markdown
Collaborator

Summary

  • netbox-3.7.8.json: security scheme was incorrectly named bearerAuth (should be tokenAuth, matching NetBox's own OpenAPI schema at every version); also dropped an anachronistic Bearer/v2 token mention since v2 tokens didn't exist until NetBox v4.5.
  • netbox-latest.json: security scheme description now documents Bearer <key>.<token> (v2) as the current standard and flags legacy Token <token> (v1) as deprecated as of NetBox v4.6, matching NetBox's own current docs.
  • netbox-latest.json: fixed a bug where servers[0].url was https://{host}/api while every path already carried an /api/ prefix, producing a broken doubled /api/api/... when resolved.
  • netbox-3.7.8.json: normalized servers/paths to the same convention used by NetBox's real /api/schema/ output (empty server url, /api/ baked into paths) — verified live against demo.netbox.dev (v4.6.5).

Test plan

  • Re-import all three NetBox OpenAPI specs as Integration Models and confirm the resolved base URLs and security scheme resolve correctly
  • Confirm a live request against a NetBox instance using the generated URL succeeds (no doubled /api/api/)

…-3.7.8

Also drops the anachronistic Bearer/v2 token mention from the scheme
description — v2 tokens weren't introduced until NetBox v4.5.
…tbox-latest

Reorders the token auth description to lead with Bearer <key>.<token>
(v2, current) and flag Token <token> (v1) as deprecated as of NetBox
v4.6, matching NetBox's own current documentation.
…tput

netbox-latest.json combined a "https://{host}/api" server URL with paths
that already carried an /api/ prefix, producing a broken doubled
"/api/api/..." when resolved. Verified against a live NetBox instance
(demo.netbox.dev, v4.6.5) that NetBox emits an empty server url and
bakes /api/ into every path.

Updated both netbox-latest.json and netbox-3.7.8.json to match that
convention: servers[0].url = "" and /api/ prefixed onto every REST
path (netbox-4.1.json already followed this pattern).
@jennlu330
jennlu330 requested a review from michaelelrom July 27, 2026 20:47

@michaelelrom michaelelrom left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@michaelelrom
michaelelrom merged commit 442d9b1 into itential:main Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants