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

refactor(java): Organize Java package paths #195

Closed
wants to merge 22 commits into from

Conversation

booniepepper
Copy link
Contributor

@booniepepper booniepepper commented Aug 30, 2023

Description

  • refactor(java): Move error and util classes around
  • refactor(java): Remove an unused date format class
  • refactor(java): Move auth classes to their own space

References

Generated version: openfga/java-sdk#10

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

booniepepper and others added 22 commits August 26, 2023 05:46
Adds integration tests for the Java SDK

For intermediate commit details, see #160

---------

Co-authored-by: Raghd Hamzeh <raghd.hamzeh@auth0.com>
Closes #169

From #170

* chore(java): Update to JUnit 5
* test(java): Move generated OpenFgaApiTest to a template
* test(java): Unit test the Check API, introduce Mockito, update javadocs
* test(java): Add unhappy case tests
* test(java): Flesh out first test on check
* clean(java): Remove lengthy javadoc descriptions in unit tests
* test(java): Add HTTP mocks and verifications
* test(java): Flesh out all unit tests and mocks
* clean(java): Remove now-unused api_test.mustache
* clean(java): Only configure tests with jvm-test-suite semantics
* clean(java): Re-order tests to follow other test suites and order of https://openfga.dev/api/service
* clean(java): Refactor tests for brevity and clarity
* test(java): Flesh out write API with writes/deletes
* test(java): Flesh out expand test, minor refactors
* test(java): Add tests on all 400/404/500s, Update status codes on some create/delete tests
Adds Configuration for the SDK. This also includes a StringUtil utility class, and basic credentials modeling (but not handling yet)

Closes #154

Details can be found in #173

* feat(java): Introduce a Configuration class
* fix(java): Assert deletion by Store ID instead of name for local dev
* fix(java): Update integ tests for Configuration change
* misc(java): Minor refactors to Configuration
* misc(java): Move Configuration class out of ApiClient
* refactor(java): Make interface of Configuration more similar to generated models
* feat(java): Add isValid() to Configuration
* misc(java): Make an errors package path
* docs(java): Note in javadocs that Configuration will take precedence over HttpClient settings
* refactor(java): Make Configuration an interface, BasicConfiguration an implementation, other updates
* refactor(java): Rename Configuration types
* feat(java): Add some Credentials types
* refactor(java): Rename Configuration template files with config- prefix
* refactor(java): Move isNullOrWhitespace out of Configuration
* feat(java): Add assertValid() to ClientCredentials
* misc(java): Update filenames of "util" classes
* Update config/clients/java/template/config-Configuration.java.mustache
  * Co-authored-by: Raghd Hamzeh <raghd.hamzeh@auth0.com>
* Update config/clients/java/template/config-Configuration.java.mustache
  * Co-authored-by: Raghd Hamzeh <raghd.hamzeh@auth0.com>
* feat(java): Add default for API URL when its null/empty/whitespace

---------

Co-authored-by: Raghd Hamzeh <raghd.hamzeh@auth0.com>
* refactor(java): Thread Configuration through request builders

* refactor(java): Thread Configuration through requests

* feat(java): Introduce ConfigurationOverride class

* test(java): Add tests on ConfigurationOverride

* refactor(java): Consistent code in Configuration.override(...)
- Add Java 20 to CI
- Use exact hashes for CI actions
- Fix broken link for models in README
- Fix artifact version in build.gradle and elsewhere
- Git ignore some files

---------

Co-authored-by: Raghd Hamzeh <raghd.hamzeh@auth0.com>
* refactor(java): Remove all @generated annotations

* refactor(java): Remove unused JSON.java

* refactor(java): Move configuration types to dev.openfga.sdk.api.configuration
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