Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Latest commit

 

History

History
51 lines (33 loc) · 3.84 KB

README.md

File metadata and controls

51 lines (33 loc) · 3.84 KB

⚠️ This repo has been deprecated in favor of https://github.com/opticdev/examples. ⚠️

Bookstore API

Bookstore API built using Fastify and Typescript with Optic. Generates an OpenAPI spec using @fastify/swagger and tracks changes using Optic. We have set up Optic to:

Take a look at the guides or just dig around the repo. You can start a server or generate an OpenAPI spec from the code.

Running this repo locally

To run this locally, you will need node >= 16 and yarn.

Get started by installing dependencies:

yarn install

And then run one of the following commands:

  • yarn start:local - starts the server
  • yarn generate-spec - generates an OpenAPI spec from code definitions

Preview API changes in PRs

Take a look at the open pull requests of the repo. It's difficult to know how the code changes will impact your API. Optic adds preview documentation and an API changelog to each PR so every developer on your team knows exactly what changes to the API have been proposed.

Here are a couple of examples of what Optic can do:

Accurate documentation and changelogs

Every time this repositories main branch is updated, a new version of your API is pushed to Optic. Developers on your team, or your consumers (if public), can see a complete API changelog, and accurate documentation for the API.

You can also add badges to your repository that show you how often your API is changing and the number of endpoints you have.

Optic badge of documentation Optic badge of changes

Set up Optic Cloud

You can follow instructions on how to set up Optic Cloud on our website. If you generate an OpenAPI spec from your code (just like this repo), you should follow our generated spec set up guide.