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

Better access into schema contents #357

Closed
gregsdennis opened this issue Dec 15, 2022 · 0 comments · Fixed by #359 or #389
Closed

Better access into schema contents #357

gregsdennis opened this issue Dec 15, 2022 · 0 comments · Fixed by #359 or #389
Labels
enhancement New feature in an existing library openapi-support Tasks that support OpenApi.Net pkg:schema

Comments

@gregsdennis
Copy link
Collaborator

Users could benefit from being able to access the data contained in the schema a bit more easily.

Add an extension .Get<T>() where T : IJsonSchemaKeyword to get the indicated keyword.

This can open the door to a set of extensions that directly get the values of the spec-defined keywords, e.g. .GetTitle().


Additionally, I would like to explore using a dictionary to store the keywords by name instead of in a list. (The Keywords property would be a forwarded property to the Values collection on the keyword, so no breakages.)

This would make accessing keywords faster.

@gregsdennis gregsdennis added enhancement New feature in an existing library pkg:schema openapi-support Tasks that support OpenApi.Net labels Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature in an existing library openapi-support Tasks that support OpenApi.Net pkg:schema
Projects
None yet
1 participant