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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 &

# Wait for all background jobs to finish
wait

21 changes: 21 additions & 0 deletions api/config/cloudapi.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { ConfigFile } from '@rtk-query/codegen-openapi';

const config: ConfigFile = {
schemaFile: '../schema/cloudapi.yml',
apiFile: '../../src/store/emptyCloudApi.ts',
apiImport: 'emptyCloudApi',
outputFile: '../../src/store/cloudApi.ts',
exportName: 'cloudApi',
hooks: { queries: true, lazyQueries: true, mutations: true },
filterEndpoints: [
'getComposeStatus',
'getComposeMetadata',
'getComposeLogs',
'getComposeManifests',
'postCloneCompose',
'getCloneStatus',
'postCompose',
],
};

export default config;
Loading
Loading