Skip to content

Move the OpenAPI schema check from pre-commit to CI #20715

@jeremystretch

Description

@jeremystretch

Proposed Changes

  • Remove the pre-commit rule which calls the verify-openapi.sh script if any API files have been modified.
  • Add a step in ci.yml to run the script

Justification

Generating the OpenAPI schema takes a considerable amount of time, which would be disruptive if we had to do it for every commit. We applied the file path check to the pre-commit rule in an effort to mitigate this, however we've found that changes not captured by this qualifier can still result in changes to the spec.

Moving this check to CI will be less disruptive for individual developers while also ensuring consistent coverage, without significantly impacting the duration of a CI job.

Metadata

Metadata

Assignees

Labels

netboxstatus: acceptedThis issue has been accepted for implementationtype: housekeepingChanges to the application which do not directly impact the end user

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions