Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

generated code outdated #3

Open
marinkobabic opened this issue Dec 26, 2021 · 11 comments
Open

generated code outdated #3

marinkobabic opened this issue Dec 26, 2021 · 11 comments

Comments

@marinkobabic
Copy link

Please can you update your project because it seems to be outdated https://github.com/simonhauck/unofficial-nordigen-api-java/blob/master/generated/src/main/java/org/openapitools/client/model/Status6e6Enum.java

new status has much more values now https://ob.nordigen.com/api/swagger.json Status1c5Enum

@simonhauck
Copy link
Owner

Thanks for the notification 👍

I updated the generated code. There were some more differences. For example some models were renamed, some additional exceptions were added.

Can you verify with this version, that everything works and give me feedback? Afterwards i would create a new release.
dependencies { implementation 'com.github.simonhauck:unofficial-nordigen-api-java:master-0228fea93e-1' }

@marinkobabic
Copy link
Author

marinkobabic commented Dec 26, 2021 via email

@marinkobabic
Copy link
Author

It seems like ssn can't be anymore null even if it's defined as optional
"optional SSN field to verify ownership of the account"

@marinkobabic
Copy link
Author

I don't think this definition is correct https://github.com/simonhauck/unofficial-nordigen-api-java/blob/master/generated/src/main/java/com/github/simonhauck/unofficial/nordigen/api/PremiumApi.java

There are a lot of void responses. Where do you get the yaml file from, in order to generate the API? It seems like they have one here https://ob.nordigen.com/api/swagger.yaml but it's not valid.

@simonhauck
Copy link
Owner

I converted the json to yaml.
marinkobabic - but it's not valid.
And yes thats the main problem. The specification is not correct... thats what makes our life way harder.
I removed some optional fields, because somehow it lead to compile errors in the generated code.

I will try to revert that commit and resolve the issues in the next days :)
If you want to be proactive, you can also create a pull request :)

@marinkobabic
Copy link
Author

I will talk with Nordigen so that we can get here some support and an official yaml file. I did also some testing. When ssn is specified, then I'm getting a message that the selected bank is not supporting ssn. When setting ssn to null or empty string, then the error is reported that the field must be specified. Have reported this issue to Nordigen.

@marinkobabic
Copy link
Author

marinkobabic commented Dec 28, 2021

Just a hint. RequisitionV2 constains now the field SSN. Even if the value is not set in the code, but the serializer should create such a field with a null value, then the API call is failing. If the value null for this field is not sent over wire, then the request works. This means for you just make ssn field nullable: true before generating the code

@simonhauck
Copy link
Owner

sorry for the late reply (you know holidays and stuff :D )

So do i understand correctly. I should only add the nullable: true for the ssn field?

@marinkobabic
Copy link
Author

marinkobabic commented Dec 30, 2021 via email

simonhauck added a commit that referenced this issue Dec 30, 2021
@simonhauck
Copy link
Owner

That would make this way easier 👍 Thanks!

i will try to resolve some other compilation errors and then i will notify you with a new version

@simonhauck
Copy link
Owner

can you please test again with com.github.simonhauck:unofficial-nordigen-api-java:3e3e0e223f

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants