-
Notifications
You must be signed in to change notification settings - Fork 23
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
Overridable OpenAPI Spec #140
Conversation
8b5462b
to
d27254c
Compare
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.
I'm still a bit unclear with this PR as it mixes changes to OAS3 spec files AND SwaggerUI serving configuration. Can we decouple these two steps? I.e, can we do it in this way:
- When we build a
turing-api
image, can we also merge files fromturing/api/api
into a single YAML spec file and include it with theturing-api
image (but we don't need Swagger UI at this point) - When we build a
turing
image, we can generate swagger-ui-dist directory and point it to bundled spec file (from step 1) - When turing-api server starts, it can merge existing
openapi.bundle.yaml
in-place with provided patch data
We can but I'm not sure how this solution would help. To me I only see the effects of having a smaller image during the Github Actions but I'm not sure if we gain anything significant. In terms of organisation wise I'm not sure if this does anything better also. It also adds a lot of noise to this PR. |
124457a
to
3a5a16a
Compare
b1ab501
to
e9d2051
Compare
@romanwozniak I have reworked the configuration into a much simpler way. The following changes have been made:
|
Now I wonder why do we use |
Left some styling suggestions, but conceptually it lgtm |
ecea410
to
f5ba827
Compare
This PR allows overriding of OpenAPI spec in the turing charts so that we can change the experiment type enum without maintaining a separate set of openapi specificiations in our private repository. The other motivation is that we are now able to override the
servers[].url
to allow custom domains other thanhttp://localhost:8080/v1
.However, in this PR, we have generalised it so that we can override any portion of the OpenAPI specification as long as it follows the OAS3 specification.
There is no longer a need to copy over the raw OpenAPI spec files (handwritten) and both the validation and the OpenAPI UI will use the same bundled OpenAPI spec file.
In the Github Actions, we now compile the OpenAPI into one bundle file and put it into the Turing API image instead of building it during the uber Turing API image step as it is required for the E2E tests.