-
Notifications
You must be signed in to change notification settings - Fork 97
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
Publish WebAPI client library for NPM #591
Publish WebAPI client library for NPM #591
Conversation
env: | ||
API: http://localhost:8080/api/v1/swagger.yaml | ||
steps: | ||
- name: Setup Node.js 18 |
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.
@YaSuenag can we try a more recent version (to avoid more painful updates in the future and ensure we stay up to date if possible)
Notes from our conversation about the flow of changes following new client libraries and at what point we save the changes in history so we can have consistency on following releases (history of client libraries etc...) --- Draft Notes ---
|
Signed-off-by: Yasumasa Suenaga <[email protected]>
cd25598
to
189c3bc
Compare
@danuw |
Signed-off-by: Yasumasa Suenaga <[email protected]>
Signed-off-by: Yasumasa Suenaga <[email protected]>
I added client example in TS to this PR: https://github.com/YaSuenag/carbon-aware-sdk/tree/pr/generate-npm-client/samples/npm-client It does not work yet because it depends the library provided by GitHub Packages in |
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.
LGTM - and thank you for the documentation piece
@danuw It might fail due to outage of Maven Central Repository: https://status.maven.org/ So can you retry after Maven Central recovers? |
Maven Central has been resumed (when I write this post, at least 😁), then these workflows have succeeded on my forked repo. |
@danuw
So can you run the workflow again with |
Thank you, it looks like it was successful now. Thank you @YaSuenag |
Thanks a lot @danuw ! All of workflows (for client libs) succeeded - I could use it in other project 👍 danuw/if-casdk-plugin#4 |
Pull Request
Issue Number: #590
Summary
Publish WebAPI client library for NPM
Changes
This PR adds new workflow to generate WebAPI client library for NPM.
The artifact would be published to GitHub Packages, so the developer can integrate the library into their own project from GitHub Packages via
npm install
.(Note that the developer should set GitHub PAT. See GitHub document for details.)
Client library generation happen via both release workflow and workflow dispatch. After this PR, Both Java and NPM library would be pushed into GitHub Packages:
Updated: 2024-11-27
I and @danuw discussed about this PR in weekly meeting, we agreed that we need to improve workflow for client generation.
This PR proposes following workflows:
You can see PR for API docs after 4.a-generate-webapi-clients.yaml . CASDK mainteners should approve/merge this ASAP.
Example of the PR: YaSuenag#2
Note that this PR fixed to specify OpenAPI document title and version from
CarbonAwareVariablesConfiguration
. It relates to the comment from @danuw in #471.Checklist
Are there API Changes?
No
Is this a breaking change?
No
Anything else?
I recommend to run
.github/workflows/4.a.1-generate-webapi-client-npm.yaml
manually after merging this PR to generate client libraries - API version does not synchronize CASDK releases.This PR Closes #590