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

UI generate spec for api #1289

Merged
merged 28 commits into from
Aug 26, 2024
Merged

Conversation

katekozlowska
Copy link

No description provided.

.gitignore Outdated Show resolved Hide resolved
@mergify mergify bot mentioned this pull request Aug 23, 2024
@belfz belfz changed the base branch from master to generate-openapi-spec August 23, 2024 09:46
package.json Outdated
"start": "yarn watch:openapi",
"start:frontend": "cd ui && yarn start"
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

TODO do przeniesienia do ui/package.json

ui/public/openapi.yaml Outdated Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
ui/generateApiClient.js Outdated Show resolved Hide resolved
@@ -18,11 +18,14 @@
"@types/react-router-bootstrap": "^0.26.6",
"@types/react-router-dom": "^5.3.3",
"@types/yup": "^0.32.0",
"axios": "^1.6.5",
"axios": "0.27.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

I was getting an error like described here: openapistack/openapi-client-axios#172
Turns out, this is an incompatibility issue related to create-react-app.
I had it fixed by downgrading axios' version, as suggested here: facebook/create-react-app#12823 (comment)

In the long run, we might think about migrating this project out of CRA and into Vite-backed codebase, as suggested in the first link.

- name: Generate OpenAPI Spec
id: generate-openapi-spec
run: sbt "backend/generateOpenAPISpec"

Copy link
Contributor

Choose a reason for hiding this comment

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

before running tests, we need an openapi.yaml file, which is then used to generate proper types (otherwise, tests would fail)

@katekozlowska katekozlowska changed the title [DRAFT] UI generate spec for api UI generate spec for api Aug 26, 2024
@katekozlowska katekozlowska merged commit 51e0a5c into generate-openapi-spec Aug 26, 2024
9 checks passed
@mergify mergify bot deleted the ui-generate-spec-for-api branch August 26, 2024 12:11
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.

2 participants