Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

API docs #16

Merged
merged 2 commits into from
Dec 14, 2019
Merged

API docs #16

merged 2 commits into from
Dec 14, 2019

Conversation

nonsleepr
Copy link
Contributor

Solves #3.

To see how it looks like, Import URL https://raw.githubusercontent.com/nonsleepr/python-eufy-security/api-docs/openapi.yaml into https://editor.swagger.io/ (a bonus: you could actually poke around API there).

The way I see it deployed, is something like described here.

openapi.yaml Outdated
$ref: '#/components/schemas/401Response'
/app/upload_hub_params:
post:
summary: AndroidApp - Set Hum Parameters
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might need to be Hub parameters instead of Hum?

@FuzzyMistborn
Copy link
Owner

Looks nice! Glad we finally are getting somewhere.

@bachya bachya changed the base branch from master to dev December 12, 2019 17:38
@nonsleepr
Copy link
Contributor Author

So, how do you think we should host the UI? Just noting that it could be imported into editor.swagger.io (it can't import by crafting the URL right now)? Or shall we utilize Github Pages?

@bachya
Copy link
Collaborator

bachya commented Dec 12, 2019

@nonsleepr I think GitHub Pages would be nice. 👍

@nonsleepr
Copy link
Contributor Author

Can you set it up? Something like this: https://github.com/peter-evans/swagger-github-pages.

@bachya
Copy link
Collaborator

bachya commented Dec 12, 2019

Might need @FuzzyMistborn to do it since he owns the repo.

@nonsleepr nonsleepr marked this pull request as ready for review December 13, 2019 19:40
@FuzzyMistborn FuzzyMistborn merged commit 85b5b19 into FuzzyMistborn:dev Dec 14, 2019
@FuzzyMistborn
Copy link
Owner

Ok the github page is setup, but I can't get it to point to dev (never dealt with swagger or github pages before). If it needs to go to master you should just commit it and everything should be set up correctly.

@bachya
Copy link
Collaborator

bachya commented Dec 15, 2019

Done. @FuzzyMistborn, going forward, let's make sure that PRs are squash-merged; it'll ensure we keep a clean commit history.

@FuzzyMistborn
Copy link
Owner

Yeah sorry, been a long week and I probably shouldn't have done that so late. Thanks!

@bachya
Copy link
Collaborator

bachya commented Dec 16, 2019

No worries! I’ve been there. 😂👍🏻

@FuzzyMistborn
Copy link
Owner

Hmm....page appears to be rendering blank. Must be other things we need to change? I think everything is set up correctly on the backend.

image

@bachya
Copy link
Collaborator

bachya commented Dec 16, 2019

I'm unclear on whether that URL matches the directory structure in master@nonsleepr, can you assist here?

@nonsleepr
Copy link
Contributor Author

Yeah, it expects to see index.html and the contents of dist in the same folder.

Possible ways to solve that:

  • A. Move stuff from dist/ to the root (I dislike polluting the root directory though).
  • B. Edit srcs and hrefs in index.html to ./dist/???`.
  • C. Rename dist/ to docs/ and change GH-Pages settings to build from "master branch /docs folder".
  • D. Create a branch called gh-pages and keep there only the index.html, openapi.yaml and the contents of dist/ folder; and change GH-Pages settings to build from gh-pages branch.

I would prefer the option D, it should be easy to automate as well.

@bachya
Copy link
Collaborator

bachya commented Dec 16, 2019

I like option D, too.

@FuzzyMistborn
Copy link
Owner

Ah, i misread the setup docs. They said move index.html out of the dist folder....i think that's where I got confused.

I also like option D.

@bachya
Copy link
Collaborator

bachya commented Dec 16, 2019

I'll take care of it. 👍

@bachya
Copy link
Collaborator

bachya commented Dec 16, 2019

Okay, gh-pages now exists and has the files @nonsleepr mentioned.

@FuzzyMistborn
Copy link
Owner

Updated the settings. On mobile atm, can check later if it worked.

@nonsleepr
Copy link
Contributor Author

It works!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants