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

makes SDK compliant with JakartaEE #361

Merged
merged 3 commits into from
Feb 23, 2024
Merged

makes SDK compliant with JakartaEE #361

merged 3 commits into from
Feb 23, 2024

Conversation

manishT72
Copy link
Contributor

Build from OAS 3.0.1

BREAKING CHANGES

  • Makes Xero-Java SDK compliant with JakartaEE.
  • Changes order of Idempotency key parameter in method definitions
  • Fixes method definitions where required request-body parameters were declared as optional.
    Following methods will have required body parameters now
    • Payroll-AU
      • updateEmployee
      • updatePayRun
      • updatePayslip
      • updateSuperfund
      • updateTimesheet
    • Files
      • uploadFile
      • updateFile
      • uploadFileToFolder
      • createFileAssociation
      • createFolder
    • Bankfeeds
      - createStatements
    • Assets
      - createAssetType

Release Notes

  • JavaEE has moved to JakartaEE. All future features will be introduced to Jakarta namespaces. Many of the famous frameworks and web servers have already accepted the move. See the details here
  • This change would require partner apps to upgrade to newer frameworks and web servers to work with JakartaEE.

Features:

  1. 354 Request for Jakarta platform compliant Xero SDK
  2. Updates the OpenAPI specifications to reflect Warnings from the API response for Payments.

Bug Fixes:

  1. 357 Error when trying to use the Xero java API on Spring Boot / Java 17

@manishT72 manishT72 merged commit 21629b5 into master Feb 23, 2024
@emeraldhieu
Copy link

emeraldhieu commented Mar 6, 2024

Can you push this to Maven Central for use?
I'm migrating to Spring Boot 3 and it failed with the error "NoClassDefFoundError: javax/ws/rs/core/UriBuilder".

@Devin-RC
Copy link

Devin-RC commented Mar 6, 2024

Can you push this to Maven Central for use? I'm migrating to Spring Boot 3 and it failed with the error "NoClassDefFoundError: javax/ws/rs/core/UriBuilder".

@emeraldhieu there's a 5.0.0-alpha version on Maven Central that fixes the NoClassDefFoundError. We are currently using that for the time being until a stable release is available.

@emeraldhieu
Copy link

@Devin-RC dev
I've tried using 5.0.0-alpha and got compilation errors due to missing com.xero.models.accounting.CurrencyCode.

@Devin-RC
Copy link

Devin-RC commented Mar 6, 2024

@emeraldhieu I just checked and I'm able to use the com.xero.models.accounting.CurrencyCode enum on version 5.0.0-alpha. It surely isn't missing. Maybe you could try cleaning and rebuilding the project?

@emeraldhieu
Copy link

emeraldhieu commented Mar 6, 2024

@emeraldhieu I just checked and I'm able to use the com.xero.models.accounting.CurrencyCode enum on version 5.0.0-alpha. It surely isn't missing. Maybe you could try cleaning and rebuilding the project?

@Devin-RC I got this build error. I run .gradlew clean test.

app/src/main/java/com/mycompany/core/mydomain/adapters/xero/XeroContactDTOMapper.java:57: error: cannot find symbol
        if (currencyCode == com.xero.models.accounting.CurrencyCode.EMPTY_CURRENCY || currencyCode == null) {
                                                                   ^

How did you check it?

Reverting to a stable version works. What's wrong with the alpha version?

@Devin-RC
Copy link

Devin-RC commented Mar 6, 2024

@emeraldhieu After a bit of digging around, you can find that the empty enum values you're referring to have actually been removed from the Accounting specification from Release 4.30.1. It is mentioned in the release notes.

You can find the exact commit diff here.

Reverting to a stable version works. What's wrong with the alpha version?

From the issue you've raised, I see you're using 4.29.1. The latest stable release is 4.30.1. I believe the 5.0.0-alpha release is based on the latest stable release, which is why it doesn't contain the enum you're looking for.

It seems that if you want to upgrade the SDK version (to resolve the JakartaEE compliance issue), you'll have to refactor your code to not refer the removed CurrencyCode.EMPTY_CURRENCY enums.

@erdi
Copy link

erdi commented Mar 6, 2024

Is there a roadmap for a stable 5.0.0, please? Is it days, weeks or months maybe? I'm upgrading a project using com.github.xeroapi:xero-java as a dependency to Jakarta EE 9 so I'm affected by the issue this PR is fixing.

@erdi
Copy link

erdi commented May 3, 2024

FWIW, it looks like 5.0 has now been released. 🚀

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.

6 participants