netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.77k stars 2.54k forks source link

Automatically build JSON schema for the device type library with each release #10030

Closed jeremystretch closed 1 year ago

jeremystretch commented 2 years ago

NetBox version

v3.2.9

Feature type

New functionality

Proposed functionality

Implement a mechanism for generating JSON schema for device type and related definitions. This could be a Django management command (e.g. manage.py buildschema), the output of which would be included with each NetBox release.

Use case

The NetBox devicetype library includes JSON schema for validating device and module type definitions. These definitions must be kept up-to-date with NetBox itself, which is currently a manual process. Generating the schema automatically and publishing it with each NetBox release will remove this administrative burden.

Additionally, once we implement #4347, schema can be generated for all relevant models as an additional resource.

Database changes

No response

External dependencies

No response

github-actions[bot] commented 1 year ago

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. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

ryanmerolle commented 1 year ago

This could be a good candidate for 3.6

danner26 commented 1 year ago

I agree this would be great!

danner26 commented 1 year ago

I have marked the PR as ready for review. This should be ready to be merged. Let me know if you need anything changed