What would the Swagger Pet Store example look like if written with BlueOak?
This.
- the Swagger spec is spread across several files that get joined together on BOS start
$ref
s in the spec are the relative paths to the files with the details of the desired object- the BOS "$ref compiler" is used to add all
definitions
,parameters
, andresponses
to the end of the main spec file- because of that, our
nodemon.json
file is set to ignore.yaml
files in theswagger
directory - because we're not watching the root spec file for changes, we put as little data there as possible
- because of that, our
- start the server using either
npm start
ornodemon
- take a look at the swagger spec served from
http://localhost:3003/swagger/bos-petstore
- if you have
swagger-commander
(donpm i -g swagger-commander
if you don't) you can simply run it to explore - if you have
swagger-ui
to run locally, you can point it to that URl to see it's representation of the spec
- if you have