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

adding new mage target to dereference schemas #221

Merged
merged 3 commits into from
Oct 10, 2022
Merged

Conversation

nitro-neal
Copy link
Contributor

@nitro-neal nitro-neal commented Oct 10, 2022

image

By running mage derefschemas this will create a new file (ex: cm-credential-manifest-deref.json) which will be the known schemas but fully dereferenced.

connected to this issue - #134

@decentralgabe
Copy link
Member

@nitro-neal nice work. how can the dereferenced schemas be used in the code?

perhaps a short doc above the method describing the need and purpose? or in the README somewhere?

@nitro-neal
Copy link
Contributor Author

Added:

// DerefSchemas takes our known schemas and dereferences the schema's $ref http links to be a part of the json schema object.
// This makes our code faster when doing validation checks and allows us to not ping outside sources for schemas refs which may go down or change.
// TODO: (Neal) Currently we do not use these dereferenced schemas in code because there is more work to be done here.
// Currently these dereferenced schemas are missing some information and fail validation with our known json objects
// I believe some more work in the investigation library needs to be done and we need to handle circular dependencies

it could also be our logic to do validation is strange, it seems that these schemas + json objects with an online tool check out..
image

Copy link
Member

@decentralgabe decentralgabe left a comment

Choose a reason for hiding this comment

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

@nitro-neal given that the schemas need some more work would you prefer this PR to stay open, or will you be taking the additional changes in a follow up PR?

Your choice. Approving.

@nitro-neal nitro-neal merged commit df1b350 into main Oct 10, 2022
@nitro-neal nitro-neal deleted the deref-schema branch October 10, 2022 19:40
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.

None yet

2 participants