-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 Smoke test - seems no tool available to test response matches the response format as described in OpenAPI spec 3.0 generated by Loopback 4. #4870
Comments
A simple script can fetch the openapi spec, for example: cd <project-root>
npm start
curl http://localhost:3000/openapi.json (or yaml) We can possibly add a |
Thanks, @raymondfeng . mentions the openapi.json and openapi.yaml . |
@vishalvisd , have you tried our recommendations? |
I have edited the question title since the replies gave me a sense that the my query was not clear. It is no big deal to get the spec json, but the question is how can we write a test case that would validate the API response's format is matching the format described in the spec. I had tried Dredd, but it's not working with OAS 3, and Loopback 4 doesn't generate OAS 2(swagger) |
Dredd has experimental support for openapi v3. Why not wait for it to mature or get involved in that project? Also can mocha testing cover the scenarios? |
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
As in documentation and here , dredd is the tool for doing API smoke testing but dredd doesn't support openapi 3.0 and loopback 4 doesnot generates swagger spec. In such a scenario how can we do the testing?
We are doing bottom up approach i.e., APIs have been implemented, Loopback creates the spec json/xml. Now, we want to test the APIs implementation against the spec
The text was updated successfully, but these errors were encountered: