Render html from openapi spec generated by typespec#707
Render html from openapi spec generated by typespec#707munishchouhan merged 64 commits intomasterfrom
Conversation
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
|
Not sure we should include this stuff within wave backend |
so we want to host them separately? |
|
Think would make more sense, either in the main docs or a mini dedicated app. Tagging @ewels |
|
Yup, I'd expect to keep just the typespec in the repo and have everything else compiled and hosted separately. Where that happens I don't have a strong opinion on - either the Wave service itself? Or the docs website? (NB: Not the docs repo). Tagging @llewellyn-sl @andrew-dawson-seqera |
|
Looks like the Platform API docs are hosted at https://cloud.seqera.io/openapi/index.html So Wave docs could live at https://wave.seqera.io/openapi/index.html for example? |
|
That's fine. Then we need to create a mini nginx service to render the docs. |
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
pditommaso
left a comment
There was a problem hiding this comment.
Nice, then we need to including this container build in the same process for the wave app container.
ok sure |
|
Not sure what the web UI is there - any chance that we can use Swagger so that it has the same look + feel as https://cloud.seqera.io/openapi/index.html please? |
ok I will look into it |
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
|
Nice |
Signed-off-by: munishchouhan <[email protected]>
src/main/groovy/io/seqera/wave/controller/OpenAPIController.groovy
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
typespec/tag-and-push-openapi.sh
There was a problem hiding this comment.
it is to build and push openapi container
typespec/routes.tsp
Outdated
| @server("https://wave.seqera.io", "wave prod endpoint") | ||
| namespace wave { | ||
| enum Versions { | ||
| v1: "1.16.8", |
There was a problem hiding this comment.
should this be updated manually?
There was a problem hiding this comment.
yes for now, typespec.yml only runs when there is a change in typespec folder and to make a doc release, we need a change there in the commit to make typespec ci run
There was a problem hiding this comment.
Would not be simpler just using a placeholder value e.g. 0.0.0 and use sed command or something similar to update it using the version in VERSION ?
There was a problem hiding this comment.
yes, that can be an option, i will move doc release to build.yml too
to not rely on typespec chnages
There was a problem hiding this comment.
ok better adding VERSION path in typespec.yml, so that it runs when we change VERSION
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
There was a problem hiding this comment.
tag-and-push-openapi.sh
Signed-off-by: munishchouhan <[email protected]>
typespec/Dockerfile
Outdated
| COPY tsp-output/@typespec/openapi3/openapi.yaml /usr/share/nginx/html/openapi/openapi.yaml | ||
|
|
||
| # Use sed to modify the default Nginx configuration to listen on port 9080 | ||
| RUN sed -i 's/listen 80;/listen 9080;/' /etc/nginx/conf.d/default.conf |
There was a problem hiding this comment.
They provide an un unprivileged image that does not require this https://hub.docker.com/r/nginxinc/nginx-unprivileged
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>






This PR will do the followings: