emerout / ocpi-swagger-sample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OCPI OpenAPI Specification

Build Status

Steps to finish

  1. Enable Travis for your repository (note: you already have .travis.yml file)
  2. Create GitHub access token; check public_repo on Select scopes section.
  3. Use the token value as a value for Travis environment variable with the name GH_TOKEN
  4. Make a test commit to trigger CI: git commit --allow-empty -m "Test Travis CI" && git push
  5. Wait until Travis build is finished. You can check progress by clicking on the Build Status badge at the top
  6. If you did everything correct, https://:emerout.github.io/ocpi-swagger-sample/ will lead to your new docs
  7. [Optional] You can setup custom domain (just create web/CNAME file)
  8. Start writing/editing your OpenAPI spec: check out usage section below
  9. [Optional] If you document public API consider adding it into APIs.guru directory using this form.
  10. Delete this section 😄

Links

  • Documentation(ReDoc): https://:emerout.github.io/ocpi-swagger-sample/
  • SwaggerUI: https://:emerout.github.io/ocpi-swagger-sample/swagger-ui/
  • Look full spec:
    • JSON https://:emerout.github.io/ocpi-swagger-sample/swagger.json
    • YAML https://:emerout.github.io/ocpi-swagger-sample/swagger.yaml
  • Preview spec version for branch [branch]: https://:emerout.github.io/ocpi-swagger-sample/preview/[branch]

Warning: All above links are updated only after Travis CI finishes deployment

Working on specification

Install

  1. Install Node JS
  2. Clone repo and cd
    • Run npm install

Usage

  1. Run npm start
  2. Checkout console output to see where local server is started. You can use all links (except preview) by replacing https://:emerout.github.io/ocpi-swagger-sample/ with url from the message: Server started <url>
  3. Make changes using your favorite editor or swagger-editor (look for URL in console output)
  4. All changes are immediately propagated to your local server, moreover all documentation pages will be automagically refreshed in a browser after each change TIP: you can open swagger-editor, documentation and swagger-ui in parallel
  5. Once you finish with the changes you can run tests using: npm test
  6. Share you changes with the rest of the world by pushing to GitHub 😄

About

License:MIT License


Languages

Language:JavaScript 80.9%Language:HTML 19.1%