-
-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate API documentation #745
Comments
Thanks @mbrookson, generating API documentation is a great idea! Someone can definitely work on that at anytime. I also think generating clients is a good idea, but let's keep this issue focused on the docs part. |
Love this idea! Might hop on it. @mbrookson Are you looking for a page to be generated, so that people can go to something like |
@merelinguist A generated page would be ideal and probably more flexible as more functionality could be added in the future I guess? Markdown would be useful still, but doesn't have quite as much potential for further features later on. |
@merelinguist Maybe the web page could be driven via a markdown file though? Best of both worlds, plus you could also then choose to do other things with the markdown if you wanted, like generate a client. |
The other question is how to distribute it. Does it only show during development? In production behind authentication? As a standalone static docs site? |
@ryardley Any idea how simple it would be to inject a page like this? |
I’d be pretty reticent to have it in production, especially if it’s supposed to be more of a handy dev tool than “here’s a guide to our complete private api”. |
Yeah that's an interesting point. Perhaps could be an option? You might want to expose docs for a public API in some instances. Getting a bit more complex here and just throwing out ideas, but perhaps it could even be per endpoint? Each function could be marked as to whether it should be exposed in public docs. For an initial implementation I'd probably err on the side of caution and keep it private and only available during development. Also in regards to how it's distributed, standalone would probably be better. Doesn't seem ideal to have to run the application just to be able to view the docs when you're actually only focused on the development of a separate mobile application. On the other hand. Perhaps the docs could be generated using a separate CLI command, run standalone, and be able to be put into a git hook so they can be generated on commit. |
Ok sounds like it shouldn't even be part of the blitz app. So not as an auto generated page, but as a standalone site. And seems like maybe there's two main use cases:
|
just stepped over this issue. This idea is super cool! Having a recipe for generating a dokz page as part of the application would be a dream come true, but perhaps for the beginning we could try to generate an openapi yaml/json and offload the integration to the enduser. |
Related discussion: #1907 |
Hello! You can see deployd.com this framework that I have been used is fantastic! I developed a full stack based on riot.js, deployd, semantic ui and others... My stack is very simular with blitz.js! I'm studying blitz.js and I'm in love with it :) |
Hi team any progress for this feature? |
What do you want and why?
When building a full stack application, it's common for it to grow into something much more. For example, a companion mobile application is often part of a website and backend ecosystem. It would great if Blitz expands to accommodate this use case more and generate easy-to-user documentation or client which can be used to build external clients that utilise the generated Blitz API.
Possible implementation(s)
axios
or purefetch
API?Additional context
I have something like swagger.io in mind, however I'm sure it could be far greater!
Example:
https://petstore.swagger.io/?_ga=2.158440947.899930001.1594640979-1996492643.1594640979
The text was updated successfully, but these errors were encountered: