Skip to content

1177 absorb javascript client#1638

Open
krowvin wants to merge 8 commits intodevelopfrom
1177-absorb-javascript-client
Open

1177 absorb javascript client#1638
krowvin wants to merge 8 commits intodevelopfrom
1177-absorb-javascript-client

Conversation

@krowvin
Copy link
Copy Markdown
Collaborator

@krowvin krowvin commented Mar 12, 2026

This is a rough copy from

https://github.com/hydrologicengineeringcenter/cwms-data-api-client-javascript

Will need

  • Plumbed into gradle / made sure JSON swagger spec is updated to pull during the build and not from the URL
  • CI/CD Updated
  • Access added to NPM for this repo

Placing here to work on it for others to see. Will mark reviewers/ready for review later.

#!/usr/bin/env bash

# Set date variable for use in version
printf -v date '%(%Y.%m.%d)T'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We use tags for versioning, Look at the various release.yamls. So the version should come through an environment variable or argument.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

then again I now see the note in the readme so maybe that's already taken care of.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

batch scripts?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's really for local. If you have docker setup. But it also predated me using act for anything.

It required real specific java versions to run it so at one point I decided to use docker to lock down all the build stuff.

Copied it over without much thought to if it needs to stay when it goes fully automated from a PROD release.

@krowvin krowvin marked this pull request as ready for review March 27, 2026 18:05
@krowvin krowvin requested a review from MikeNeilson March 27, 2026 18:06
Copy link
Copy Markdown
Contributor

@MikeNeilson MikeNeilson left a comment

Choose a reason for hiding this comment

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

Change this all to use java/gradle to generate the API itself, there's an existing subproject, adjust options as required to match existing output.

Additionally, for now, remove the publish steps we'll deal with that in a follow up after we verify everything works.

The existing tests should be valid, you might have to experiment with exactly where they go and how they get referenced.

You might be able to reference https://github.com/opendcs/opendcs/tree/main/java/api-clients for some additional examples.

Also make sure that there is some form of build task, should be in the gradle, that does the equivalent of what npm run build would do (the OpenDCS Typescript client does this). The generators can sometimes output incorrect code and that catches that before it's used anywhere.

@krowvin
Copy link
Copy Markdown
Collaborator Author

krowvin commented Mar 27, 2026

Note to self from Mike

Make sure i'm using gradle commands to do things like build the docs/examples/run the generator

Check how OpenDCS does this - build.gradle file that knows how to integrate into the gradle build. Gradle plugin should do generation

Move tests to the javascript dir with the other tests

Make sure to target current gradle version for CDA

Node plugin for gradle

Make a typescript directory under clients

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.

Absorb javascript client

2 participants