- The point of this project is provide to the devs a structure and logical flow to create a REST API documentation without swagger or other tool. Why? I dont know. ⭐. But you can use it instead install gems or packages to your backend project, Why? I dont know 🌟
- TypeScript
- Storybook
- Sass
- create-react-app
-
You can put your json in
public/data/and edit the value ofendpoint_urlinconfig.ts. -
If your json dont have this structure you can edit the
generateData()function ingenerateData.tsand make sure the output satisfy the typescript interfaceEndpoint. This is a implementation of a strategy pattern to allow you use this project with any json structure of your api schema, not only a OpenAPI structure.
[
{
"title": "Food",
"description": "Check food of a restaurant",
"endpoint": "restaurant/:id_restaurant/food",
"fields": [
{
"field": "id_restaurant",
"rules": {
"description": "Id of restaurant",
"location": "path",
"required": true
}
}
],
"methods": [
{
"description": "Return all dishes from a restaurant",
"method": "GET",
"title": "Get Dishes",
"url": "restaurant/:id_restaurant/food",
"response": {
"body": {
"status": "200",
"payload": [
{
"id": 2,
"name": "X"
},
{
"id": 3,
"name": "X"
}
]
}
}
}
]
}
],- In
src/config.tsyou can use Firebase for implement a Login form, you need create a .env file and set your application key REACT_APP_FIREBASE=KEY. You can turn off the login with thewith_loginflag insrc/config.ts.
- You can customize all the styles of this project, this project dont have any framework or ui library, just scss files
src/compositionsis the implementation of thesrc/uicomponents to build the documentation screensrc/compositions/DocumentationApp/index.tsxis the core of the documentation screensrc/providersare providers and contexts to share state withsrc/compositionscomponents likesrc/compositions/DocumentationApp/Navigation
- This project is not finished. We going add tiny features like a search input.
Thanks goes to these wonderful people (emoji key):
Carlos Azuaje 🐛 📖 🤔 💻 |
aradkdj 💻 📖 👀 🐛 |
Ricardo Moreno 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
