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

Some schema fixes #1033

Merged
merged 1 commit into from
Sep 2, 2024
Merged

Some schema fixes #1033

merged 1 commit into from
Sep 2, 2024

Conversation

anderseknert
Copy link
Member

These don't matter to the type checker, so wasn't caught before.

These don't matter to the type checker, so wasn't caught before.

Signed-off-by: Anders Eknert <anders@styra.com>
Copy link
Member

@srenatus srenatus left a comment

Choose a reason for hiding this comment

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

How did you notice if the type checker doesn't care? 💭

@anderseknert
Copy link
Member Author

anderseknert commented Sep 2, 2024

I moved the schema to the bundle directory, added this snippet to one of the entrypoints:

print(json.match_schema(input, data.regal.schema))

then ran go run main.go lint --enable-print bundle and watched the cascade of errors :)

Should really look into making that part of the tests, but it's a little tricky as the schemas are placed where they are to appease Go'sembed directive and its limitations on where it can embed files from... and I'd rather not have to deal with duplicates as I'd most certainly would forget to change things in two places. But I'm sure it's all solveable with some more time to spend.

@anderseknert anderseknert merged commit a525c98 into main Sep 2, 2024
3 checks passed
@anderseknert anderseknert deleted the schema branch September 2, 2024 07:40
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
These don't matter to the type checker, so wasn't caught before.

Signed-off-by: Anders Eknert <anders@styra.com>
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