Skip to content

Conversation

@fmenezes
Copy link
Collaborator

@fmenezes fmenezes commented May 24, 2023

⚠️ DO NOT MERGE ⚠️

Jiras: CLOUDP-179039, CLOUDP-181608

This is a POC of auto-generating commands using openapi-generator-cli

Demo

Untitled.mov

Design

  • Some design choices were made considering scripted usage only and non-interactive commands.
  • All commands that pass a request body to the API have to pass a json via --file or standard input
  • Unlike our CLI today there is no --output instead all commands write json and have a --format that you can use to filter data (similar to docker inspect)
  • Watchers are possible to implement but require manual intervention (ref)
  • Docs are taken straight from the API, but can be customized (example)
  • commands are grouped following how our APIs are grouped, so there is no deep nesting for commands anymore
  • all generated commands are under atlas api

Considerations

  • I've used https://openapi-generator.tech/ to generate commands straight from open API spec, currently I'm downloading the transformed openapi spec that SDK is using, which is a requirement given we need our data types matching across given we use SDK in the generated code.
  • I'm using go.mod to fetch which version of SDK is currently used so regenerating commands would be dependent on SDK upgrades, as in a PR is opened to update SDK and we run make gen-openapi on the same PR

@fmenezes fmenezes added the WIP Work in progress label May 26, 2023
@fmenezes fmenezes changed the title Auto generation POC CLOUDP-179039 Auto generation POC May 30, 2023
@wtrocki
Copy link
Member

wtrocki commented Jun 2, 2023

Truly astonishing how close this looks compared to user written code.

@fmenezes fmenezes changed the title CLOUDP-179039 Auto generation POC Auto generation POC Jun 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

This PR has gone 30 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!

@github-actions github-actions bot added the stale A stale issue or PR label Jul 7, 2023
@wtrocki wtrocki removed the stale A stale issue or PR label Jul 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2023

This PR has gone 30 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!

@github-actions github-actions bot added the stale A stale issue or PR label Dec 1, 2023
@github-actions github-actions bot closed this Dec 31, 2023
@github-actions github-actions bot removed the stale A stale issue or PR label Jan 3, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2024

This PR has gone 30 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!

@github-actions github-actions bot added the stale A stale issue or PR label Feb 3, 2024
@ciprian-tibulca
Copy link
Collaborator

bump

@github-actions github-actions bot removed the stale A stale issue or PR label Feb 5, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2024

This PR has gone 30 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!

@github-actions github-actions bot added the stale A stale issue or PR label Mar 7, 2024
@github-actions github-actions bot closed this Apr 6, 2024
@github-actions github-actions bot removed the stale A stale issue or PR label Apr 25, 2024
@github-actions
Copy link
Contributor

This PR has gone 30 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 30 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!

@github-actions github-actions bot added the stale A stale issue or PR label May 30, 2024
@github-actions github-actions bot closed this Jun 30, 2024
@gssbzn gssbzn deleted the generation_poc branch February 20, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale A stale issue or PR WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants