Skip to content

Conversation

@ShubhamSinghgit
Copy link

@ShubhamSinghgit ShubhamSinghgit commented Oct 7, 2025

Thank you @ssaengs for the feedback!

This PR has been updated to automate the generation of backward-compatible draft-07 JSON schemas directly from the source Go structs, as you suggested.

Implementation

I've modified the spec/generate.go script to produce the new schemas. This ensures that they will always remain in sync with the godo type definitions and resolves the original validator bug in IDEs like VS Code.

A Note on CI and go generate

While working on this, I discovered several pre-existing dependency issues with the project's global go generate ./... command (specifically with the marketplace generator).

To keep this PR focused, I ran the spec/generate.go script directly to generate the necessary files. The changes in this PR are self-contained and fully resolve the schema validation issue. Any potential CI failures from other, unrelated generator scripts are due to those pre-existing issues.


Fixes issue #93

appschema draft-07 appschema image

@ssaengs
Copy link
Collaborator

ssaengs commented Oct 8, 2025

Out of curiosity, how were the schemas generated? Is there a possibility to leverage the generate.go to perform this generation. Ideally, we should be able to easily generate them directly from the source code.

@ShubhamSinghgit
Copy link
Author

ShubhamSinghgit commented Oct 8, 2025

@ssaengs Thanks for the great feedback.

Now that I look into the spec/generate.go script, I think modifying it to automatically generate backward-compatible draft-07 schemas is a much better approach.

I'm just cleaning things up now and will push the new commits with the updated generator and the auto-generated schemas shortly. Thanks again for the guidance!

Modify generate.go to produce backward-compatible JSON schemas directly from the Go structs
@ShubhamSinghgit ShubhamSinghgit force-pushed the fix/app-spec-schema-compatibility branch from a1dc14b to 347f048 Compare October 8, 2025 09:59
@ShubhamSinghgit
Copy link
Author

@ssaengs I've just pushed an update to address your feedback.

The generate.go script now automatically creates the draft-07 schemas as you suggested.

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