Skip to content

Commit

Permalink
feat(docs): api specs as openapi, postman and insomnia (#404)
Browse files Browse the repository at this point in the history
* feat(docs): Add API documentation specs

* feat(docs): add styles, icons, layout and locales
  • Loading branch information
nathabonfim59 authored Feb 15, 2024
1 parent 8837935 commit 0a60ef1
Show file tree
Hide file tree
Showing 9 changed files with 788 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/insomnia.json

Large diffs are not rendered by default.

733 changes: 733 additions & 0 deletions docs/openapi.yaml

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions public/theme-v2/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,30 @@ nav .container {
}
}

#documentation-links {
margin-top: 16px;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
justify-content: center;
}

#documentation-links img {
margin: 0 10px;
width: 24px;
}

#documentation-links img {
filter: invert(16%) sepia(7%) saturate(7485%) hue-rotate(175deg) brightness(88%) contrast(90%);
}

#documentation-links img:hover {
filter: invert(19%) sepia(55%) saturate(2547%) hue-rotate(212deg) brightness(95%) contrast(89%);
}

#about {
background: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), color-stop(50%, #fcf8e3), color-stop(50%, #fafafa), to(#fafafa));
background: linear-gradient(180deg, #fcf8e3 0%, #fcf8e3 50%, #fafafa 50%, #fafafa 100%);
Expand Down
6 changes: 6 additions & 0 deletions public/theme-v2/images/ic-insomnia.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/theme-v2/images/ic-postman.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/theme-v2/images/ic-swagger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions views/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ body
p= __('bannerDescription')
.col
a.btn-primary(href='https://github.com/omarciovsena/abibliadigital/blob/master/DOCUMENTATION.md' target='_blank' title=__('documentationTitle'))= __('bannerButton')
ul#documentation-links
li: a.doc-icon.icon-svg(href='https://insomnia.rest/run/?label=AB%C3%ADbliaDigital%20API&uri=https%3A%2F%2Fraw%2Egithubusercontent%2Ecom%2Fomarciovsena%2Fabibliadigital%2Fmaster%2Fdocs%2Finsomnia.json' target='_blank' title=__('bannerDocInsomniaTitle')): img(src='/theme-v2/images/ic-insomnia.svg' alt=__('bannerDocInsomniaTitle'))
li: a.doc-icon.icon-svg(href='https://www.postman.com/nathabonfim59/workspace/github-contributions/api/c9a09e38-b0ca-41f4-85bb-d7cea69d4866' target='_blank' title=__('bannerDocPostmanTitle')): img(src='/theme-v2/images/ic-postman.svg' alt=__('bannerDocPostmanTitle'))
li: a.doc-icon.icon-svg(href='https://editor.swagger.io/?url=https%3A%2F%2Fraw%2Egithubusercontent%2Ecom%2Fomarciovsena%2Fabibliadigital%2Fmaster%2Fdocs%2Fopenapi.yaml' target='_blank' title=__('bannerDocSwaggerTitle')): img(src='/theme-v2/images/ic-swagger.svg' alt=__('bannerDocSwaggerTitle'))
// How To Use
section#howToUse
.container
Expand Down
5 changes: 4 additions & 1 deletion views/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"availabilityDescription": "Servers stable and prepared for high requests loads",
"bannerButton": "Documentation",
"bannerDescription": "Access our documentation, see how simple it is and start integrating today.",
"bannerDocInsomniaTitle": "Open API documentation in Insomnia",
"bannerDocPostmanTitle": "Open API documentation in Postman",
"bannerDocSwaggerTitle": "Open API documentation in Swagger",
"bannerTitle": "Get started now",
"buttonContactUs": "Contact us",
"buttonStartNow": "Get started now",
Expand Down Expand Up @@ -67,4 +70,4 @@
"yearly": "Yearly",
"bannerDescription1": "bannerDescription1",
"bannerDescription2": "bannerDescription2"
}
}
5 changes: 4 additions & 1 deletion views/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"availabilityDescription": "Servidores estáveis e preparados para altas cargas de requisições",
"bannerButton": "Documentação",
"bannerDescription": "Acesse nossa documentação, veja o quanto é simples e comece hoje a sua integração.",
"bannerDocInsomniaTitle": "Abrir documentação da API no Insomnia",
"bannerDocPostmanTitle": "Abrir documentação da API no Postman",
"bannerDocSwaggerTitle": "Abrir documentação da API no Swagger",
"bannerTitle": "Teste agora!",
"buttonContactUs": "Fale Conosco",
"buttonStartNow": "Comece já",
Expand Down Expand Up @@ -67,4 +70,4 @@
"yearly": "Anual",
"bannerDescription1": "bannerDescription1",
"bannerDescription2": "bannerDescription2"
}
}

0 comments on commit 0a60ef1

Please sign in to comment.