- Create markdowns with contracts inside
./docs
folder - see also: proper MD files structure - Copy
./setup
files to your root dir in project - Install dependencies by
yarn
command - Build project by
yarn build
command - Run
index.html
in your browser or deploy it with netlify
Your MD files should have specific structure like this:
./docs
/Auth
post.login.md
post.register.md
/User
get.user.md
get.user_{uuid}.md
...
File names should have the same template: {method}.{name-or-uri}.md
, where:
{method}
is REST API method likepost
,get
,patch
,put
,delete
, etc. ORmodel
for general models{name-or-uri}
could be just a name likepaged-result
oruri
like:user_{uuid}_roles
Examples:
get.user_{uuid}_roles}
->GET user/{uuid}/roles
get.paged-result
->GET paged-result
- Change api-contractor paths in
index.html
, for each case:./node_modules/
->lib/api-contractor/
- Create new netlify build
- Set netlify build command:
npm run build && cp -R ./node_modules/api-contractor ./lib/api-contractor
- Deploy!