-
Notifications
You must be signed in to change notification settings - Fork 356
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
feat: generate and use swagger typescript client [DET-3249 DET-3324 DET-3355] #691
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b982b93
add Java to CONTRIBUTING.md
hamidzr d8aed40
ci: circle ci
hamidzr 55f5cdd
feat: build swagger client and use it
hamidzr 8cdf9c4
fix import typo
hamidzr f419010
remove added generated code under src/
hamidzr 2533830
add a default make target
hamidzr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,9 +44,9 @@ git clone [email protected]:determined-ai/determined.git | |
- Go (>= 1.13) | ||
- Python (>= 3.6) | ||
- Node (>= 12) | ||
- Yarn (>= 1.22.0) | ||
- Docker (>= 19.03) | ||
- Protoc (>= 3.0) | ||
- Java (>= 7) | ||
|
||
### Building Determined | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules/ | ||
deps/ | ||
src/ | ||
hamidzr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
PROJECT_ROOT := "../.." | ||
|
||
.PHONY: get-deps-swagger | ||
get-deps-swagger: | ||
mkdir -p deps | ||
wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.14/swagger-codegen-cli-2.4.14.jar \ | ||
-O deps/swagger-codegen-cli.jar | ||
|
||
.PHONY: get-deps-package | ||
get-deps-package: | ||
npm ci --no-audit | ||
|
||
.PHONY: build-swagger | ||
build-swagger: | ||
mkdir -p src | ||
java -jar deps/swagger-codegen-cli.jar generate -i \ | ||
${PROJECT_ROOT}/proto/build/swagger/determined/api/v1/api.swagger.json \ | ||
-l typescript-fetch -o src/ | ||
|
||
.PHONY: build-package | ||
build-package: | ||
# depends on build-swagger | ||
npm run build | ||
|
||
.PHONY: get-deps | ||
get-deps: get-deps-swagger get-deps-package | ||
|
||
.PHONY: build | ||
build: build-swagger | ||
$(MAKE) build-package | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -r deps/ || true | ||
rm -r node_modules/ || true | ||
rm -r src/ || true | ||
rm -r lib/ || true |
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Do we need to announce in engineering once this lands that they need to update? Is this just if you want to work on the front-end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm needed by anyone that needs to build the npm package, publish it, or otherwise use it so for the time being mostly anyone working touching the frontend or wanting to run frontend tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please announce in #engineering once this lands. Thanks!