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

Add json-schema for pod-specifications. #911

Merged
merged 2 commits into from
Dec 7, 2023
Merged

Conversation

floitsch
Copy link
Member

Enables completion and validation in editors that support json-schema.

To test, download the schema and add the following property to a pod-specification file:

  "$schema", "file:///path/to/schema"

Once the schema is published, we should then require the $schema (instead of "version": 1), thus identifying the document and its version.

Basically, pod-specifications should then always have:

"$schema": "https://raw.github.com...."

Also note: json-schemas work for yaml files too, as long as the yaml-extension (from Red Hat) is installed. However, they want the schema as comment:

# yaml-language-server: $schema=<URI>

We could make this a requirement for our pod specifications (if written in YAML).

@floitsch floitsch requested a review from kasperl November 26, 2023 00:29
Copy link
Contributor

@kasperl kasperl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

public/schemas/v1/pod-specification-schema.json Outdated Show resolved Hide resolved
@floitsch floitsch enabled auto-merge (squash) December 7, 2023 11:41
@floitsch floitsch merged commit c0b82d5 into main Dec 7, 2023
5 checks passed
@floitsch floitsch deleted the floitsch/json-schema branch December 7, 2023 11:55
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.

2 participants