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

Api: generate RTK Query for CloudAPI #2439

Closed
wants to merge 1 commit into from

Conversation

mgold1234
Copy link
Collaborator

This commit adds the Cloud API to RTK Query in preparation of porting cloudapi source code to image-builder-frontend

  • paste entire cloudApi schema
  • setup cloudApi in api/config file
  • create new emptyCludApi.ts file
  • add the new end point to the store
  • npm run api that generate the cloudApi.ts file with all the endpoints

This commit adds the Cloud API to RTK Query in preparation of porting cloudapi source code to image-builder-frontend
* paste entire cloudApi schema
* setup cloudApi in api/config file
* create new emptyCludApi.ts file
* add the new end point to the store
* npm run api that generate the cloudApi.ts file with all the endpoints
@@ -6,7 +6,7 @@ npx @rtk-query/codegen-openapi ./api/config/rhsm.ts &
npx @rtk-query/codegen-openapi ./api/config/contentSources.ts &
npx @rtk-query/codegen-openapi ./api/config/provisioning.ts &
npx @rtk-query/codegen-openapi ./api/config/edge.ts &

npx @rtk-query/codegen-openapi ./api/config/cloudapi.ts &
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the newline in this case

Suggested change
npx @rtk-query/codegen-openapi ./api/config/cloudapi.ts &
npx @rtk-query/codegen-openapi ./api/config/cloudapi.ts &

@regexowl
Copy link
Collaborator

I've tried to run npm run api and there were some changes generated, maybe running it once more is needed to make the "Check for manual changes to API" check happy?

@croissanne
Copy link
Member

I've tried to run npm run api and there were some changes generated, maybe running it once more is needed to make the "Check for manual changes to API" check happy?

To avoid this I think cloudApi.ts needs to be added to .eslintignore, otherwise lint:js:fix will conflict with api:generate.

@regexowl
Copy link
Collaborator

To avoid this I think cloudApi.ts needs to be added to .eslintignore, otherwise lint:js:fix will conflict with api:generate.

Ah right! That explains the changes.

@mgold1234 mgold1234 marked this pull request as draft September 19, 2024 07:46
@lucasgarfield
Copy link
Collaborator

Superseded by #2424

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants