-
Notifications
You must be signed in to change notification settings - Fork 4
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
Render html from openapi spec generated by typespec #707
Render html from openapi spec generated by typespec #707
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]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
typespec/tag-and-push-docs.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typespec/tag-and-push-openapi.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is to build and push openapi container
typespec/routes.tsp
Outdated
namespace wave { | ||
enum Versions { | ||
v1: "1.16.8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be updated manually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok better adding VERSION path in typespec.yml, so that it runs when we change VERSION
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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]>
typespec/tag-and-push-docs.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tag-and-push-openapi.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They provide an un unprivileged image that does not require this https://hub.docker.com/r/nginxinc/nginx-unprivileged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
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: