-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Ability to be used as a general parser #190
Comments
Hi, Thanks for your kind words! martian/core/src/martian/openapi.cljc Line 163 in b96a1de
It will return a normalised list of handlers with the parameters described using plumatic schema. The shape is defined by the spec here: martian/core/src/martian/spec.cljc Line 23 in b96a1de
I thought Malli had a json schema / openapi parser but it seems maybe not. |
Thanks a lot! I tried parsing this spec with this code with my limited understanding: (-> "api.yaml"
(slurp)
(clj-yaml.core/parse-string)
(martian.openapi/openapi->handlers {})) But I still see the refs in the content types etc. Am I doing this right? |
Hi, Apologies for the delayed reply. Martian does not have the ability to parse remote refs. It would not be impossible to add it as an additional resolver function here, but that would make it less pure. Alternatively the schema could be pre-walked to resolved remote refs first, and then this function would remain pure. |
Hello!
Thanks a lot for making and maintaining this great tool, has helped me out quite a lot!
I have a few use cases wherein I have a need to just parse OpenAPI/Swagger docs into data for me to walk that tree and infer/transform it:
I use the quite heavy and clunky to use standard java parser for OpenAPI in these and was wondering if martian could be used just for this:
I tried playing with it and reading the docs but wasn't sure if this could be done? Apologies if this already works and I didn't see it!
Thanks again!
The text was updated successfully, but these errors were encountered: