Skip to content

Fixes #22303: Annotate fields & omit parameters in OpenAPI schema#22434

Open
jeremystretch wants to merge 1 commit into
mainfrom
22303-openapi-fields-omit
Open

Fixes #22303: Annotate fields & omit parameters in OpenAPI schema#22434
jeremystretch wants to merge 1 commit into
mainfrom
22303-openapi-fields-omit

Conversation

@jeremystretch

Copy link
Copy Markdown
Member

Fixes: #22303

Extend NetBoxAutoSchema to annotate the optional fields and omit query parameters.

@jeremystretch

Copy link
Copy Markdown
Member Author

@claude /review Only report on issues of potential concern; we don't need commentary on anything that doesn't require further consideration.

@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Claude finished @jeremystretch's task in 1m 5s —— View job


PR Review

One potential concern:

Comment mentions ?brief but it's not implemented (schema.py:279)

The inline comment reads:

# Expose the ?fields, ?omit, and ?brief query parameters supported by NetBoxModelViewSet

But only fields and omit are added as OpenApiParameter entries — brief is absent from the implementation. Since brief is a real supported parameter (set in BaseViewSet.initialize_request), either:

  • The comment should drop the mention of ?brief (if the omission is intentional), or
  • A brief parameter entry should be added alongside fields and omit

Fix this →

@jeremystretch jeremystretch force-pushed the 22303-openapi-fields-omit branch from 6c78051 to d59f5f4 Compare June 10, 2026 17:57
@jeremystretch jeremystretch requested review from a team and bctiemann and removed request for a team June 10, 2026 18:09
@jeremystretch jeremystretch marked this pull request as ready for review June 10, 2026 18:09
@jeremystretch

Copy link
Copy Markdown
Member Author

Addressed the above.

Didn't update contrib/openapi.json as part of this PR (that will happen during the release process), but did verify that it makes the intended changes.

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.

OpenAPI schema is missing fields param

1 participant