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

Changes for release 2.0.0 #29

Open
wants to merge 142 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
f001a9f
initial structure and first examples for golang
peter-va Jan 19, 2023
313ca25
big refactor
peter-va Apr 9, 2023
e2a63b3
more
peter-va Apr 9, 2023
c67c5fa
more
peter-va Apr 9, 2023
799b44b
finished
peter-va Apr 9, 2023
ce0be56
add 1.8 tests
peter-va May 18, 2023
0a8cf0e
sparql tests in java
peter-va Apr 16, 2024
11ea5fc
added documentation for java
peter-va Apr 16, 2024
a8eedde
add curl commands
peter-va Apr 16, 2024
52a8004
typos
peter-va Apr 16, 2024
caa86a3
python examples
peter-va Apr 16, 2024
fffc9be
Merge branch 'go-examples' into pva/sparql-examples
peter-va Apr 17, 2024
8694389
go examples
peter-va Apr 17, 2024
770698a
postman examples
peter-va Apr 17, 2024
14c70aa
Merge pull request #15 from NCIEVS/pva/sparql-examples
peter-va Apr 17, 2024
59d3b3c
EVSRESTAPI-395: Fhir examples (#16)
bcarlsenca Jun 7, 2024
337f2ed
Merge branch 'master' into develop
bcarlsenca Jun 7, 2024
2693b83
EVSRESTAPI-469: some prep work on sparql (#17)
bcarlsenca Jun 14, 2024
dbf4cb8
Add support for sparql (#18)
bcarlsenca Jun 15, 2024
7c69ef6
EVSRESTAPI-469: more sparql documentation
bcarlsenca Jun 15, 2024
c49a28f
Merge branch 'develop' of github.com:NCIEVS/evsrestapi-client-SDK int…
bcarlsenca Jun 15, 2024
d7f2932
typo fixing
peter-va Jun 21, 2024
3b4e38d
Remove discussion about prefixes from curl/bash examples
bcarlsenca Jun 24, 2024
54cef15
fixes to curl
bcarlsenca Jun 24, 2024
09d44e2
Other minor changes
bcarlsenca Jun 24, 2024
b4a3a8f
Small fix to query
bcarlsenca Jun 24, 2024
0b350e5
Merge pull request #19 from NCIEVS/bac/fix-sparql
gaaliciA1990 Jun 25, 2024
7fe5679
Pva/evsrestapi 469 sparql documentation (#20)
peter-va Jun 26, 2024
5ce6463
EVSRESTAPI-469: additional cleanup (#21)
bcarlsenca Jun 26, 2024
c03674b
added missing postman calls
peter-va Jun 26, 2024
62e18ed
EVSRESTAPI-470 regen java code (#22)
gaaliciA1990 Jul 1, 2024
afd0afa
generated python code. Added version control plugin
gaaliciA1990 Apr 30, 2024
e0c4a0b
Generated python code and updated imports. Updated documentation
gaaliciA1990 May 6, 2024
a0538dd
Regenerated the java code based on updated swagger
gaaliciA1990 Jun 17, 2024
3d71d35
Updated code generator to build python code as well. Updated swagger …
gaaliciA1990 Jun 17, 2024
2a967d2
Updated code generatorsf
gaaliciA1990 Jun 18, 2024
f7b4ab1
Fixed tests failing due to undeclared content type
gaaliciA1990 Jun 25, 2024
78e7a9f
removed python examples after update to api
gaaliciA1990 Jun 25, 2024
3afe7b0
Added back missing file from python-examples
gaaliciA1990 Jun 25, 2024
73662e0
Fixed failing tests. Updated README with missing examples
gaaliciA1990 Jun 26, 2024
2993166
removed swagger doc, added localhost swagger url remote input spec
gaaliciA1990 Jun 26, 2024
d154979
Updated HistoryEndpointApi tests to align with curl examples. Added e…
gaaliciA1990 Jun 27, 2024
655631d
Added generated python code and updated imports
gaaliciA1990 Jun 28, 2024
d049497
updated the codegen README for python generation
gaaliciA1990 Jun 28, 2024
576ad4a
Added missing example sections, fixed header names, updated test names
gaaliciA1990 Jun 28, 2024
cad3774
Updated documentation for python examples. Fixed api client
gaaliciA1990 Jun 29, 2024
b2ae1a2
Fixed imports causing test setup error
gaaliciA1990 Jul 1, 2024
4634a8c
Updated documentation for python steps
gaaliciA1990 Jul 1, 2024
af007aa
Fixing config settings for default api configs
gaaliciA1990 Jul 2, 2024
64ac27a
Added python tests, fixed java tests
gaaliciA1990 Jul 2, 2024
5b3c763
Implemented python metadata endpoin tests. Fixed Java testss
gaaliciA1990 Jul 3, 2024
840662a
implemented the history api tests. Updated tests to use pytest
gaaliciA1990 Jul 10, 2024
0ca5475
Implemented tests for mapset api. Updated README
gaaliciA1990 Jul 10, 2024
0a95b3e
regenerate python code for missing methods
gaaliciA1990 Jul 10, 2024
d8876ff
regenerated java code and updated documentation
gaaliciA1990 Jul 10, 2024
d89f734
fixed some documentation, updated tests, regenerated python code
gaaliciA1990 Jul 12, 2024
2ba383e
regenerated python code against dev. Updated imports in tests and __i…
gaaliciA1990 Jul 12, 2024
41bdbad
Updated python generation packages and documentation
gaaliciA1990 Jul 12, 2024
036ddf7
Use --data-binary in calls as it preserves line termination whitespace
bcarlsenca Jul 18, 2024
42ad7c7
Merge branch 'develop' of github.com:NCIEVS/evsrestapi-client-SDK int…
bcarlsenca Jul 18, 2024
915f4c7
bac/EVSRESTAPI-470-fix-java-test
bcarlsenca Jul 22, 2024
4110c74
Merge from develop
bcarlsenca Jul 22, 2024
71f561e
Updating the URL to prod in the config.ini files
gaaliciA1990 Jul 23, 2024
58eb29e
Merge pull request #23 from NCIEVS/alg/EVSRESTAPI-441-PythonSDK
gaaliciA1990 Jul 23, 2024
6e2b931
Merge branch 'master' into develop
bcarlsenca Sep 4, 2024
03f0868
Update postman collection
bcarlsenca Sep 5, 2024
ab067dd
gradle build
peter-va Sep 6, 2024
46b4a7c
initial go
peter-va Sep 9, 2024
dc3ceed
Moved TS code to TS-examples, added start of test, jest needs to be d…
gaaliciA1990 Sep 9, 2024
23fc6a1
add config
peter-va Sep 11, 2024
5480905
other changes
peter-va Sep 11, 2024
6a791e8
go progress
peter-va Sep 11, 2024
fbd227d
history done
peter-va Sep 11, 2024
b810321
more tests
peter-va Sep 11, 2024
a5f6ba3
add more concept tests
peter-va Sep 12, 2024
ba66a3d
subset tests
peter-va Sep 12, 2024
f4fbfbb
half of the search tests
peter-va Sep 12, 2024
002aa0d
rest of search tests
peter-va Sep 12, 2024
4d49271
finish metadata
peter-va Sep 12, 2024
34e3ceb
add readme changes
peter-va Sep 12, 2024
a2da15e
another gitignore change
peter-va Sep 12, 2024
ba1b1ea
more changes to readme + rewriteUrl
peter-va Sep 12, 2024
f3066bb
gitignore
peter-va Sep 12, 2024
e465bb1
some changes from review
peter-va Sep 13, 2024
f941f3e
more deleted files
peter-va Sep 13, 2024
eff44bd
some changes
peter-va Sep 13, 2024
43e9b14
test changes
peter-va Sep 13, 2024
179a4b5
remove stuff that doesn't match
peter-va Sep 13, 2024
5a8c26c
extracted json from pointers (for one test)
peter-va Sep 13, 2024
7e6d258
api outputs for each test + clarification on -v
peter-va Sep 13, 2024
e5ec9aa
forgot fmt imports
peter-va Sep 13, 2024
55364d2
fixing imports and such
peter-va Sep 13, 2024
1ec6f61
outputs + tweaks to test names
peter-va Sep 13, 2024
fef1224
part of readme done
peter-va Sep 13, 2024
00d9617
finished readme
peter-va Sep 13, 2024
8d37003
buildme tweaks
peter-va Sep 13, 2024
3d147a9
remove more unnecessary files
peter-va Sep 13, 2024
21b5586
Merge pull request #26 from NCIEVS/pva/EVSRESTAPI-481-client-sdk-gola…
peter-va Sep 16, 2024
ce752a4
Merge branch 'develop' into pva/EVSRESTAPI-483-client-sdk-typescript-…
peter-va Sep 16, 2024
d63daca
change to config
peter-va Sep 17, 2024
de66fc4
a successful API call
peter-va Sep 17, 2024
877e873
change one test
peter-va Sep 18, 2024
1b8012e
add concept tests
peter-va Sep 18, 2024
8f470d6
history tests
peter-va Sep 18, 2024
bcf2ee9
name changes
peter-va Sep 18, 2024
9a2508c
readme start
peter-va Sep 18, 2024
1f9d834
more readme changes
peter-va Sep 18, 2024
294f85a
more readme
peter-va Sep 18, 2024
543df92
readme tweaks
peter-va Sep 18, 2024
62eb74d
another tweak
peter-va Sep 18, 2024
19b0bef
continual tweaks
peter-va Sep 18, 2024
bcfe8a3
mapset tests
peter-va Sep 18, 2024
f9bc535
subset tests
peter-va Sep 18, 2024
54c0348
some search endpoint tests
peter-va Sep 18, 2024
7e0b92b
a few metadata tests
peter-va Sep 18, 2024
5321b94
more metadata tests
peter-va Sep 19, 2024
318e3a6
more tests in search
peter-va Sep 19, 2024
16915ae
tweak readme
peter-va Sep 19, 2024
6f6a3af
fix search tests
peter-va Sep 19, 2024
e33c3db
tweaks to tests + readme
peter-va Sep 19, 2024
083463d
add a couple missing tests
peter-va Sep 19, 2024
23414d0
add outputs
peter-va Sep 19, 2024
f9831cf
add a bit to the readme about url config
peter-va Sep 20, 2024
f3c3642
remove file
peter-va Sep 20, 2024
755c4d7
uncomment typescript in build.gradle
peter-va Sep 24, 2024
f3a428d
add typescript instructions to buildme.md
peter-va Sep 24, 2024
53529a7
Update BUILDME.md
peter-va Sep 24, 2024
d19aab4
Update BUILDME.md
peter-va Sep 24, 2024
b999a20
Update README.md
peter-va Sep 25, 2024
636f188
Update README.md
peter-va Sep 25, 2024
68f6281
Update README.md
peter-va Sep 25, 2024
7b748c0
change commands used for tests
peter-va Sep 30, 2024
49e4635
Merge pull request #27 from NCIEVS/pva/EVSRESTAPI-483-client-sdk-type…
peter-va Sep 30, 2024
1682021
EVSRESTAPI-509 Created the R5 examples, updated the README to align w…
gaaliciA1990 Sep 5, 2024
b991a0a
EVSRESTAPI-509 Updated R5 file to align with R4, updated README with …
gaaliciA1990 Sep 5, 2024
c22ede2
Editing postmane files to adjust pass correct ids and update CM issues
gaaliciA1990 Sep 26, 2024
364cd1c
EVSRESTAPI-509 Updated variables to be lowercase where applicable. So…
gaaliciA1990 Nov 15, 2024
4b4d02d
EVSRESTAPI-509 Updated main README to include new added examples
gaaliciA1990 Nov 15, 2024
ad9ad98
Merge pull request #25 from NCIEVS/alg/EVSRESTAPI-509-FhirR5-SDK-Exam…
gaaliciA1990 Nov 19, 2024
e1c4c88
changing translate url key to system
gaaliciA1990 Nov 19, 2024
f40ba06
Merge pull request #28 from NCIEVS/alg/HOTFIX-updating-url-to-system
gaaliciA1990 Nov 20, 2024
38fd03f
Merge branch 'master' into develop
bcarlsenca Nov 28, 2024
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
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ python-examples/logs.txt

doc/code-gen/.idea
doc/code-gen/.gradle
doc/code-gen/build
doc/code-gen/build
*/.gradle
*/gradle/wrapper
*/gradle/wrapper/*
*/node_modules
typescript-examples/package-lock.json
typescript-examples/package.json
61 changes: 46 additions & 15 deletions doc/code-gen/BUILDME.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you need to regenerate a single client for a given language:
3. The code will generate in a `build` dir. Navigate to the `build` dir.
4. From the `build` dir, copy the generated code files and any other files required to build the project to the
corresponding "examples" folder.
1. See [next steps](#tasks-to-regenerate-code--copy-files) for details based on your language generated
1. See [next steps](#tasks-to-regenerate-code--copy-files) for details based on your language generated

**[Back to top](#evsrestapi-regenerate-client-sdks)**

Expand All @@ -31,7 +31,7 @@ If you need to rebuild all the clients for all languages, typically after a big
3. All generated projects will be in a `build` folder. Navigate to the `build` folder to see the generated code
4. From the `build` folder, copy the generated code files and additional files needs to build/compile the project to the
corresponding `-examples` folder.
1. See [next steps](#tasks-to-regenerate-code--copy-files) for details
1. See [next steps](#tasks-to-regenerate-code--copy-files) for details

**[Back to top](#evsrestapi-regenerate-client-sdks)**

Expand All @@ -46,10 +46,10 @@ corresponding `-examples` directory
1. To generate the client code for java, run `./gradlew buildJavaSdk`
2. Find the generated client in `build/java`
3. Copy the new files generated from the `src/main` folder to the `java-examples/src/main` folder.
1. 🚫🚫 **DO NOT** replace `ApiClient.java`
1. `java-examples` uses `src/main/resources/url.properties` to set the basePath url in `ApiClient.java`.
1. The url should be updated in the `url.properties` file only.
2. 🚫🚫 **DO NOT** replace tests. Update tests to demo the new api calls or fix failing tests.
1. 🚫🚫 **DO NOT** replace `ApiClient.java`
1. `java-examples` uses `src/main/resources/url.properties` to set the basePath url in `ApiClient.java`.
1. The url should be updated in the `url.properties` file only.
2. 🚫🚫 **DO NOT** replace tests. Update tests to demo the new api calls or fix failing tests.
4. Verify the gradle files match between what was generated vs what exists in `java-examples`. Update as needed, but
**don't** override.
5. Verify the project builds and the tests run successfully before pushing changes
Expand All @@ -59,29 +59,60 @@ corresponding `-examples` directory
1. To generate the client code for python, run `./gradlew buildPythonSdk`
2. Find the generated client in `build/python`
3. Copy the new files generated from the `build/python/python-examples/` folder to the `python-examples` folder.
1. 🚫🚫 **DO NOT** replace `api_client.py`,
1. `python-examples` uses `config.ini` to set the basePath url in `api_client.py`. The url should be updated in
the `config.ini` files only. Compare the generated `api_client.py` with the already existing one to determine
if anything is missing. Add sections as needed.
2. 🚫🚫 **DO NOT** replace `requirements.txt`, or `test-requirements.txt`.
1. We have additional requirements added that aren't part of the generated requirements files. Compare the
generated `requirements.txt` and `test-requirements.txt` to the existing ones and add new reqs as needed
1. 🚫🚫 **DO NOT** replace `api_client.py`,
1. `python-examples` uses `config.ini` to set the basePath url in `api_client.py`. The url should be updated in
the `config.ini` files only. Compare the generated `api_client.py` with the already existing one to determine
if anything is missing. Add sections as needed.
2. 🚫🚫 **DO NOT** replace `requirements.txt`, or `test-requirements.txt`.
1. We have additional requirements added that aren't part of the generated requirements files. Compare the
generated `requirements.txt` and `test-requirements.txt` to the existing ones and add new reqs as needed
4. ⚠️⚠️ Update imports for `api.__init__.py` and `models.__init__.py` to add `evs.` as a prefix in the `from` statement. The generated
code doesn't include the root package in the imports in these files which will cause the tests to fail.
5. 🚫🚫 **DO NOT** replace tests. Update tests to demo the new api calls or fix failing tests.
6. Verify the tests run successfully in the IDE and the terminal before pushing changes.

**[Back to top](#evsrestapi-regenerate-client-sdks)**

### Go client

1. To generate the client code for Go, run `./gradlew buildGoSdk`
2. Find the generated client in `build/go`
3. Copy the new files generated from the `build/go/` folder to the `go-examples` folder. Only copy files that have a .go suffix (e.g. client.go).
1. The `test` directory will contain some boilerplate test skeletons for the generated APIs. We won't be using those. Add any new API tests (or new API test files) to the already existing test files in the `go-examples` directory.
2. Files related to configuration and bootstrapping such as `client.go` and `configuration.go` work out of the box and don't need to be copied over again.
1. `configuration.go` contains the different test environments that are currently supported, as well as a method for switching between them. See the baseUrls struct in [configuration.go](../../go-examples/configuration.go#L90) for the currently supported test environments and their corresponding URLs. Change the url key [a few lines down](../../go-examples/configuration.go#L99) in `url := baseUrls['production']` to select what environment you wish to run the tests in.
2. If you'd like to add new environments, simply add a new entry to the baseUrls struct to register it.
4. Install necessary imports as per the Installation section in the README (which resides in `go-examples` [here](../../go-examples/README.md#installation)).
5. 🚫🚫 **DO NOT** replace tests. Update tests to demo the new api calls or fix failing tests. The same applies to the `go-examples` README documentation. Avoid replacing api documentation in favor of adding new api calls in the same format (which is likely available in the auto-generated README).
6. Verify the tests run successfully in the IDE and the terminal before pushing changes.
1. To run the go tests, see the [test running](../../go-examples/README.md#test-running) section of the `go-examples` README.

**[Back to top](#evsrestapi-regenerate-client-sdks)**

### Typescript client

1. To generate the client code for Typescript, run `./gradlew buildTypescriptSdk`
2. Find the generated client in `build/typescript`
3. Copy the new api files generated from the `build/typescript/api` folder to the `typescript-examples/api` folder. Only copy files from this directory, as the rest are helper functions and configuration/utility code that won't need to change as the API does.
1. `typescript-examples/config.json` contains the different test environments that are currently supported, as well as a method for switching between them. See the baseUrls struct in [config.json](../../typescript-examples/config.json#L2) for the currently supported test environments and their corresponding URLs. Change the currentEnvironment key [a few lines down](../../typescript-examples/config.json#L8) to select what environment you wish to run the tests in.
2. If you'd like to add new environments, simply add a new entry to the baseUrls struct to register it.
4. Install necessary imports as per the Installation section in the README (which resides in `typescript-examples` [here](../../typescript-examples/README.md#extra-library-installation)).
5. 🚫🚫 **DO NOT** replace tests. Update tests to demo the new api calls or fix failing tests. The same applies to the `typescript-examples` README documentation. Avoid replacing api documentation in favor of adding new api calls in the same format (which is likely available in the auto-generated README).
6. Verify the tests run successfully in the IDE and the terminal before pushing changes.
1. To run the typescript tests, see the [test running](../../typescript-examples/README.md#test-running) section of the `typescript-examples` README.

**[Back to top](#evsrestapi-regenerate-client-sdks)**

## Resources

* https://github.com/int128/gradle-swagger-generator-plugin?tab=readme-ov-file#introduction
* https://stackoverflow.com/questions/66137846/how-to-use-the-open-api-3-gradle-plugin
- <https://github.com/int128/gradle-swagger-generator-plugin?tab=readme-ov-file#introduction>
- <https://stackoverflow.com/questions/66137846/how-to-use-the-open-api-3-gradle-plugin>

## Current Contributors

- [Brian Carlsen](https://github.com/bcarlsenca)
- [Alicia Garcia](https://github.com/gaaliciA1990)
- [Peter Van Ausdeln](https://github.com/peter-va)
- [Other Contributors](https://github.com/NCIEVS/evsrestapi-client-SDK/graphs/contributors)

**[Back to top](#evsrestapi-regenerate-client-sdks)**
37 changes: 33 additions & 4 deletions doc/code-gen/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,43 @@ tasks.register('buildPythonSdk', GenerateTask) {
dependsOn tasks.named('clearBuildDir')
}

tasks.register('buildTypescriptSdk', GenerateTask) {
generatorName.set("typescript")
remoteInputSpec.set(inputURL)
outputDir.set("$buildDir/typescript")
modelPackage.set("models")
configOptions.set([
"npmName": "evs",
"npmVersion": "1.0.0",
"supportsES6": "true",
"hideGenerationTimestamp": "false",
// if there are unknown properties present, ignore them
"additionalProperties": "true"
])
dependsOn tasks.named('clearBuildDir')
}

tasks.register('buildGoSdk', GenerateTask) {
generatorName.set("go")
remoteInputSpec.set(inputURL)
outputDir.set("$buildDir/go")
configOptions.set([
"packageName": "evs",
"hideGenerationTimestamp": "false",
// Enable handling unknown properties
"additionalProperties": "true"
])
dependsOn tasks.named('clearBuildDir')
}

/** Runs all code-gen tasks for each language to generate the clients */
tasks.register("buildClients") {
dependsOn("buildJavaSdk",
"buildPythonSdk",
// "buildGoSdk",
"buildGoSdk",
// "buildKotlinSdk",
// "buildBashSdk",
// "buildTypescriptSdk"
"buildTypescriptSdk"
)
doLast {
println 'All client sdk generated. They can be found in the code-gen/build folder.'
Expand All @@ -91,8 +120,8 @@ compileJava.dependsOn tasks.named("buildJavaSdk")
build.dependsOn('buildClients')
publishToMavenLocal.dependsOn = ["buildJavaSdk`",
"buildPythonSdk",
// "buildGoSdk",
"buildGoSdk",
"buildTypescriptSdk",
// "buildKotlinSdk",
// "buildBashSdk",
// "buildTypescriptSdk"
]
Loading