Skip to content

arbolista-dev/swagger-pets

Repository files navigation

Swagger Pets Api

Writing Tests

  1. Run npm run develop:test:record. This will log any http requests to terminal. Save them in test/nock/{operationId}.json.
  2. Run npm run generate:tests. This will scaffold your necessary tests. It will fail if you are missing a test.
  3. Implement your generated tests npm run develop:test.

Edit swagger file locally

In order to edit the API's swagger file locally you should:

  • Download the Swagger UI engine, there are two options:
  • Navigate to the directory where the Swagger UI engine has been downloaded.
  • Run a static file web server to expose the files on the Swagger UI's folder:
    • You may want to try superstatic:
      • In the console type sudo npm install -g superstatic.
      • Then inside the Swagger UI's folder console type superstatic.
      • By default the Swagger UI could be reached at http://localhost:3474.
  • On the Swagger UI' interface select file -> import file -> select the file on src/api/swagger/api-definition.yml.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published