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

[FEATURE] Rich validation and IDE editor support via rigorous JSON validation #988

Closed
toddbaert opened this issue Nov 1, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@toddbaert
Copy link
Member

Requirements

Use a rigorous schema for validation in flagd. See dependency issue for full details.

@toddbaert toddbaert added enhancement New feature or request good first issue Good for newcomers labels Nov 1, 2023
@weyert
Copy link

weyert commented Nov 1, 2023

How do you imagine the editor? A simple web gui to visually add feature flags or more to edit the JSON file? I think the former is a better user experience?

@toddbaert toddbaert self-assigned this Dec 22, 2023
@beeme1mr beeme1mr changed the title [FEATURE] Rich validation and editor support via rigorous JSON validation [FEATURE] Rich validation and IDE editor support via rigorous JSON validation Jan 5, 2024
@toddbaert
Copy link
Member Author

toddbaert commented Jan 11, 2024

Really the only thing I wanted to do was add a schema and publish it online. If you do that, most IDEs will add basic validation. See the gif from this PR: open-feature/flagd-schemas#120

validation

I've finished the schema with that PR, the only thing to do now is publish it to flagd.dev (that's what I'll use this issue for).

@beeme1mr
Copy link
Member

beeme1mr commented Feb 8, 2024

Schema: https://flagd.dev/schema/v0/flags.json
Documentation: https://flagd.dev/reference/schema/

@beeme1mr beeme1mr closed this as completed Feb 8, 2024
@austindrenski
Copy link
Member

@beeme1mr @toddbaert what do you guys think about getting this added to the official JSON Schema Store?

Many IDEs pull schemas from there by default, and it would allow (depending on your IDE) schema recognition without having to include $schema manually (e.g. this is the case for JetBrains tools).

I haven't gone through their contributor process before, but from a quick skim of their docs, it looks like they offer options to host in their repo or externally (don't think we'd need to, but just calling it out in case there are any concerns about needing to iterate faster than we think their process would allow):

@beeme1mr
Copy link
Member

beeme1mr commented Feb 8, 2024

It's already there 😄
https://github.com/SchemaStore/schemastore/blob/master/src/api/json/catalog.json#L520-L536

@austindrenski
Copy link
Member

It's already there 😄 https://github.com/SchemaStore/schemastore/blob/master/src/api/json/catalog.json#L520-L536

hot dog! chalk that one up to a bad regex 🤦🤦🤦

@toddbaert
Copy link
Member Author

It's already there 😄 https://github.com/SchemaStore/schemastore/blob/master/src/api/json/catalog.json#L520-L536

hot dog! chalk that one up to a bad regex 🤦🤦🤦

NP Austin I'm glad had the idea too... you know what they say about "great minds".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants