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

CLI: Overlays #961

Open
jasmingacic opened this issue Nov 9, 2022 · 1 comment
Open

CLI: Overlays #961

jasmingacic opened this issue Nov 9, 2022 · 1 comment

Comments

@jasmingacic
Copy link
Contributor

Overlays implementation should be done in the CLI to resemble something like

kusk deploy -i openapi.yaml  --overlay path/to/overlay

and

kusk generate -i openapi.yaml  --overlay path/to/overlay

To speed up the process we should us this library https://github.com/ponelat/overlays-cli to have it done. Since it is a JS app we need to package it using https://github.com/vercel/pkg.

The binary should go into embeded binaries in go code. Having it this way will spare users of unnecessary steps to install it.

If overlay parameter is present in CLI parameters we'd invoke that binary and pass openapi spec with the overlay file and collect the output.

We should allow users to pass overlay file which contains yaml property extends to put together final OpenAPI spec.

extends: https://petstore3.swagger.io/api/v3/openapi.json

p.s. @aabedraba should I reach out to Ponelat for permission to use his project?

@aabedraba
Copy link

I think deploying the overlay directly will make sense, given the details for the OpenAPI will be in the extends keyword:

kusk deploy -i overlay.yaml

The CLI would then need to detect if it's an Overlay or an OpenAPI file.


I will reach to Josh.

@kylehodgetts kylehodgetts removed their assignment Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants