Skip to content

mrtnvh/openapi-monorepo-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openapi-monorepo-demo

This is a monorepo containing a frontend project demonstrating an automated OpenAPI workflow.

Structure:

  • Frontend: Consumer of the API, dependant on the mocking server and auto-generated sdk
  • Mock: Scripts to run an automated API mocking server, based on Prism, dependant on the OpenAPI doc.
  • OpenAPI: OpenAPI specification for the API + OpenAPI linting based on Spectral and a documentation generation based on Elements
  • SDK: SDK for the API, generated through openapi-typescript-codegen OpenAPI doc.

Installation

npm ci

Development

By running the following command, the system will first build the SDK, based on the /openapi/petstore.yml OpenAPI document, then, in parallel, start the mock server on port 4010, the frontend on port 3000 and the OpenAPI documentation website on port 8080.

npm run dev

Documentation

Open the documentation on http://localhost:8080 by running,

npm run docs

Linting

Lint the OpenAPI document using Spectral by running the following command, to enforce our chosen OpenAPI style guide.

npm run lint

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published