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-sdk): restructure java template #492

Merged

Conversation

piotrooo
Copy link
Contributor

@piotrooo piotrooo commented Feb 16, 2025

Description

As the first step of #476, we introduce well-formatted Java SDK template files to mimic the real (or nearly real) generated Java SDK file structure.

Introduced structure:

.
├── docs
├── example
│   └── example1
│       ├── gradle
│       │   └── wrapper
│       ├── links
│       └── src
│           └── main
│               ├── java
│               │   └── dev
│               │       └── openfga
│               │           └── sdk
│               │               └── example
│               ├── kotlin
│               │   └── dev
│               │       └── openfga
│               │           └── sdk
│               │               └── example
│               └── resources
├── libraries
│   └── native
└── src
    ├── main
    │   ├── api
    │   │   ├── auth
    │   │   ├── client
    │   │   │   └── model
    │   │   └── configuration
    │   ├── errors
    │   ├── telemetry
    │   └── util
    ├── test
    │   ├── api
    │   │   ├── auth
    │   │   ├── client
    │   │   └── configuration
    │   ├── telemetry
    │   └── util
    └── test-integration
        ├── api
        │   └── client
        └── resources

@jimmyjames I saw that you committed something directly to the java-sdk repo. Will you backport your changes after this PR will be merged, or I should wait, and rebase? If so, please align sdk-generator with java-sdk, and I'll rebase it.

References

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

@piotrooo piotrooo requested a review from a team as a code owner February 16, 2025 20:56
@jimmyjames
Copy link
Contributor

👋 hey @piotrooo thanks for the contribution!

Yeah, I sometimes have a bad habit of making changes directly to the SDK when no generated models are needed, and then porting back to the generator 😑.

I'm going to get the generator synced up today and get a new release of the java SDK out; I'll report back when that's done and then yeah, if you wouldn't mind rebasing that would be great.

@jimmyjames
Copy link
Contributor

Ok, generator and SDK are back in sync, if you want to rebase the PR we can get this in before any more changes 😄

@piotrooo piotrooo force-pushed the refactor/restructure-java-templale branch from f7b76a7 to 437dfaa Compare February 19, 2025 21:05
@piotrooo
Copy link
Contributor Author

@jimmyjames done ✅ rebased with main.

One question: should I add anything to the changelog?

Yeah, I sometimes have a bad habit of making changes directly to the SDK when no generated models are needed, and then porting back to the generator 😑.

No worries? I noticed that a lot of team members have been doing that 🤷‍♂️ Maybe someday, everyone will follow this point in the contribution guide 😉

be created and modified through pull requests to this sdk-generator repository instead of individual repositories.

@jimmyjames
Copy link
Contributor

One question: should I add anything to the changelog?

No, since there are is nothing functionally changing with the SDK (I verified there are no changes to the SDK), no changelog entry is needed.

I noticed that a lot of team members have been doing that 🤷‍♂️ Maybe someday, everyone will follow this point in the contribution guide 😉

Yeah, we as a team need to be be better about this, and holding each other accountable :)

Copy link
Contributor

@jimmyjames jimmyjames left a comment

Choose a reason for hiding this comment

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

😍 love it, thanks @piotrooo! 🙇

@jimmyjames jimmyjames added this pull request to the merge queue Feb 20, 2025
Merged via the queue into openfga:main with commit 9d1121b Feb 20, 2025
11 checks passed
@piotrooo piotrooo deleted the refactor/restructure-java-templale branch February 20, 2025 16:45
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