Skip to content
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 OpenAPI schema for REST API #5643

Closed
fm3 opened this issue Jul 29, 2021 · 4 comments · Fixed by #5693
Closed

Generate OpenAPI schema for REST API #5643

fm3 opened this issue Jul 29, 2021 · 4 comments · Fixed by #5693

Comments

@fm3
Copy link
Member

fm3 commented Jul 29, 2021

With an openAPI schema the rest API client could be auto-generated.
We should investigate if there is a scala lib that auto-generates this from the play routes.
We should be able to blacklist some routes (not everything is supposed to be used except by webKnossos itself)

@jstriebel
Copy link
Contributor

@jstriebel
Copy link
Contributor

@fm3 @youri-k Could one of you have a look if this might work? Just having the specs for a couple of endpoints would be already very helpful.

@jstriebel
Copy link
Contributor

@fm3 The most important routes for the schema would be:

  • GET /datasets/:organizationName/:dataSetName
  • GET /annotations/:typ/:id/download
  • POST /annotations/upload

Plus routes for dataset up- and download on the datastore.

PS: Another openAPI plugin (fork), which can be used to specify the returned schema:
https://github.com/kinoplan/swagger-play/

@jstriebel
Copy link
Contributor

The datastore route /datasets/:organizationName/:dataSetName/layers/:dataLayerName/data works great for blob download. A schema for the upload route(s) would be great, though (POST on /datasets and /datasets/finishUpload?).

@fm3 fm3 closed this as completed in #5693 Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants