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 api documentation for "POST /api/extras/scripts/" request #16731

Open
ngotzmann opened this issue Jun 26, 2024 · 1 comment
Open

Missing api documentation for "POST /api/extras/scripts/" request #16731

ngotzmann opened this issue Jun 26, 2024 · 1 comment
Labels
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

@ngotzmann
Copy link

ngotzmann commented Jun 26, 2024

Deployment Type

Self-hosted

NetBox Version

v4.0.5

Python Version

3.11

Steps to Reproduce

  1. Go to https://demo.netbox.dev/api/schema/swagger-ui/#/extras/extras_scripts_create or your self hosted
    1.1. Under "Parameters", you will notice there are no parameters

  2. Trying to call the api endpoint without body, will result in an error (who would have expected this 😄 )

  3. I used following curl command:

curl -X 'POST' \
  'https://netbox/api/extras/scripts/' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H "Authorization: Token XXX" \
  -d ''

Expected Behavior

Having all fields available on this endpoint documented

Observed Behavior

{
  "error": "null value in column \"module_id\" of relation \"extras_script\" violates not-null constraint\nDETAIL:  Failing row contains (19, , null, t).",
  "exception": "IntegrityError",
  "netbox_version": "4.0.5",
  "python_version": "3.11.2"
}
@ngotzmann ngotzmann added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Jun 26, 2024
@jeffgdotorg
Copy link
Collaborator

Thanks for reporting a problem in NetBox.

I've reproduced the problem in a fresh install of NetBox v4.0.6. With a little bit of lateral exploring I'm finding the lack of parameter documentation is not unique to extras/scripts; for example, extras_tags_create also lacks parameter documentation, though POSTing to that endpoint with an empty body provides useful feedback rather than an internal server error.

I'm moving your issue out of triage and into needs owner status. If you or another developer with the requisite skills and capacity would like to work it through to a PR, please say so and a maintainer will assign the issue to you.

@jeffgdotorg jeffgdotorg removed their assignment Jun 27, 2024
@jeffgdotorg jeffgdotorg added 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 and removed status: needs triage This issue is awaiting triage by a maintainer labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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