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

Hyperschema #71

Closed
gregsdennis opened this issue Jan 22, 2021 · 5 comments
Closed

Hyperschema #71

gregsdennis opened this issue Jan 22, 2021 · 5 comments
Labels
feature New JSON functionality to support in a new library

Comments

@gregsdennis
Copy link
Collaborator

gregsdennis commented Jan 22, 2021

Describe the functionality that isn't covered by this suite
Hyperschema should be implemented.

@gregsdennis gregsdennis added the feature New JSON functionality to support in a new library label Jan 22, 2021
@gregsdennis
Copy link
Collaborator Author

gregsdennis commented Mar 2, 2021

URI templates are required by this specification. The previous .Net implementation is .Net Framework and hasn't been ported yet (not even into .Net 5). I looked at just pulling the class into the library, but it appears that it's not just a simple copy/paste of the class definition.

I'll either need to wait for MS to port it, or see if I can find one. I'm not sure I understand enough about the domain to implement it myself.

@gregsdennis
Copy link
Collaborator Author

gregsdennis commented Mar 2, 2021

Looks like someone did the direct port! Well, several people did, but this is the one I'm using.

@gregsdennis
Copy link
Collaborator Author

From the spec, section 6.4.1 on template pointers

The value of the "templatePointers" link description property MUST be an object. Each property value in the object MUST be a valid JSON Pointer [RFC6901], or a valid Relative JSON Pointer...

I can't evaluate relative pointers because of a limitation in the JSON element structure. I won't be able to support evaluating schemas with these for now.

@gregsdennis
Copy link
Collaborator Author

It sounds like this is more for code gen than validation, like generation of API clients. Visual Studio can do this for an API that publishes a swagger file. You point the tool at the API, and it generates all of the models and a client.

Is there any validation expected here? Even the spec doesn't really talk about "an instance is valid against this keyword if x criteria are met." I'm struggling to figure out what a validator would do with this.

I'm leaning on the Slack community to answer this.

@gregsdennis
Copy link
Collaborator Author

Confirmed in the JSON Schema Slack that this isn't a validation vocabulary. It's for tooling support.

I'm not sure that's something I want to support. At least not right now. Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New JSON functionality to support in a new library
Projects
None yet
Development

No branches or pull requests

1 participant