Skip to content

Add JSON schema validation for Context Data #19377

@TribuneX

Description

@TribuneX

NetBox version

v4.3.0

Feature type

New functionality

Proposed functionality

Similar to the proposal outline in #19025 it would be really useful if a user could specify a json schema along with a config context entry.

Use case

The structure of config context can be crucial for consuming systems (e.g. automated provisioning). We currently implement JSON schema validation with custom validation. However, it is always difficult to identify which config context a certain validation should be applied to.

Being able to assign a schema directly to a config context entry would remove that complexity.

Database changes

Add an optional schema JSONField to the Config Context data model.

External dependencies

jsonschema for implementing the validation in the backend

Metadata

Metadata

Assignees

Labels

complexity: mediumRequires a substantial but not unusual amount of effort to implementstatus: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions