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

API Description Documents and Parse Results for Integration Testing #35

Open
kylef opened this issue Dec 8, 2018 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@kylef
Copy link
Member

kylef commented Dec 8, 2018

Right now we provide swagger-zoo as a package with common Swagger 2 document and their API Elements parse result. We should bring -zoo or similiar packages for each API Description format we support (API Blueprint, OpenAPI 2, OpenAPI 3). This makes it easier for other integrators to provide them with test documents, Dredd is making use of swagger-zoo. API Blueprint equivilent should likely include all of the test fixtures from Drafter.

Once this is complete, we can simplify our own testing strategy in our parsing service as we can make our tests use the zoo fixtures. When we update the parser we will update to the matching zoo and then all of the integration tests would be against API Elements from the same parser version. Right now it can be cumbersome as updating the parser can break some of the integration tests and requires digging through them and updating them (sometimes across multiple repos).

Secondly, I think we should share the "Polls API" examples we produced in these zoo packages along with their API Element parse results. This means that Apiary can take these examples directly from the package and it can utilise the API Elements Parse Result for its own example generation. I know right now that Apiary includes versions of the parser to generate these examples parse results during deploy. This generation could be updated to use these new -zoo like Polls API fixture parse result so that Apiary doesn't need to depend on these parser adapters which I believe can speed up npm install time by a few minutes if it no longer needs to depend on the parsers.

We could take into account #32 and #34 regarding naming. Since these zoo packages specifically contain API Elements, perhaps they should be branded like such @apielements/openapi2-examples etc.

/cc @honzajavorek for any feedback from swagger-zoo for API Blueprint equivilent package
/cc @freaz Let me know your thoughs on the last part of this regarding Apiary examples.

@kylef kylef added the enhancement New feature or request label Dec 8, 2018
@honzajavorek
Copy link
Contributor

I like the whole idea. My only comment would be that mson-zoo exists to test the "Attributes Kit". Do we want to adopt it into the API Elements package as well or is it a different can of worms?

pksunkara pushed a commit that referenced this issue Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants