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

Include other fields in parse_openapi_spec() #191

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mgirlich
Copy link
Owner

@mgirlich mgirlich commented Aug 2, 2023

Closes #190.
This now parses most of the fields in the OpenAPI spec. But there are some fields that can't (yet?) be covered by tibblify, e.g. minItems and maxItems, the description or even the enums.

@jonthegeek
Copy link

I'm finally digging into this (after realizing it will cover a lot of what I'm over-engineering for beekeeper). For the APIs on apis.guru, of those with an openAPI version >= 3.0, 827 parsed (mostly) successfully, and 694 threw an error and failed. Honestly that's probably good enough for me right now, but it would be great to work through and figure out what fails!

The "mostly" in the successful batch comes from warnings:

Warning message:
There were 3747 warnings in `dplyr::mutate()`.
The first warning was:
ℹ In argument: `paths = purrr::map2(...)`.
Caused by warning in `yaml.load()`:
! NAs introduced by coercion: 1602844091815 is out of integer range
ℹ Run dplyr::last_dplyr_warnings() to see the 3746 remaining warnings. 

Of those 3747 warnings, all but 6 were that same "NAs introduced by coercion" family. We might be able to avoid that by treating everything as character with a handler in yaml.load(). I'll have to dig in and see exactly where that happens.

The other 6 warnings were URLs that needed to be urlencoded, such as https://api.apis.guru/v2/specs/drchrono.com/v4 (Hunt Valley)/openapi.json

I see that this is now behind main. What else would we need to do to get this finalized? It definitely seems like an improvement over what you have, and it's getting really close to the full thing!

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.

Fully parse Open API spec
2 participants