-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Improve docs on exports API endpoints #14224
Improve docs on exports API endpoints #14224
Conversation
✅ Deploy Preview for frigate-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Worth noting that in the dev branch the API docs are now generated automatically, this can be merged but it will be fixed automatically when 0.15 is released
Yes |
Oh neat! I see, docusaurus will be generating pages from the openAPI spec, that'll be cool for a lot of reasons. Though I guess the json request and response body stuff still needs filling out for those: I pondered whether I can add that too, while I'm digging around, but I can't see what actually generates that openAPI spec file though, is it generated by the fastAPI definitions, or is that part not yet defined? Or is it intended to be manually modifying the openapi spec file? |
it is generated by fastapi, though I believe the contributor that implemented fastapi has already planned to work out building out the schema of responses. |
Oh, awesome! Yeah, I see it's mentioned on #14178, cool! Alright, I won't worry about digging through that then. This fix should be fine for 0.14 at least |
@SpangleLabs I'm currently updating the requetsts/responses to have better/more information 🙏 I will be working on this for 1-2 weeks and every endpoint should have a better documentation If you find any incongruency please let me know. Whenever I open a new PR if I remember I'll tag you
Basically, now FastAPI generates the json spec (which for now, we convert manually - this might be an automation on the future - but for now there's no need to do it) and then docusaurus openAPI plugin generates the docs from the spec file. |
Proposed change
Type of change
(Not sure if docs should be a separate type here, or whether this counts as new feature, for documenting features without docs, or bugfix for adding docs where they perhaps should have existed)
Additional information
I was unsure whether this merges into dev or master, but I saw other PRs merged into master when updating docs (for example #14202) and dev branch will be headed towards post-0.14 changes now I suppose.
Originally I was planning to add an issue asking why these features weren't available in the API, but then I checked the API source and found they do exist.
One question I do have is that it seems like the /api/exports endpoint lists the video path relative to the container root, rather than relative to the web root. Is that intended? Should a user of that API strip "/media/frigate" from the video path, or that they should just use the export ID as
{frigate_url}/exports/{export_id}.mp4
Checklist
ruff format frigate
)(Not applicable for the docs directory?)
Screenshot: