-
Notifications
You must be signed in to change notification settings - Fork 3
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
Updated json2typescript to 1.4.1 #160
Conversation
@andreas-aeschlimann Is this ready for review? |
With this PR, full class inheritance should be possible also with incompatible type annotations on different subclasses / siblings. |
I locally ran the tests and it was fine, I don't know why it failed here. |
That was a general issue, should be fixed now. |
@andreas-aeschlimann I would like to try to rebuild my original class hierarchies on this branch to see if it works now. |
2 tests are failing since the upgrade to json2typescript 1.3.0. I could not figure out yet why this happens @tobiasschweizer |
|
I think that's due to a missing decorator in https://github.com/dasch-swiss/knora-api-js-lib/blob/6520ea63b30ae201996f3e59f6d9d7035858022a/src/models/v2/resources/values/create/create-interval-value.ts#L7 certainly my fault, I will create an issue for it |
Interesting, because seconds ago I opened this issue: appvision-gmbh/json2typescript#129 In my older projects, I had errors too and found simply that properties were ignored of child classes when the decorator was missing. |
:-) please have a look at #173 |
@andreas-aeschlimann Just let me know once there is a version 1.3.1 |
@andreas-aeschlimann Will the issue with incompatible decorators be fixed as of 1.3.0 (1.3.1)? What is 1.2.5? |
I recommend updating to v1.4.1. It finally
The reason for this sudden version bump:
|
Updated to 1.4.1. Tests are passing locally, so this should be good to go. |
Ok, I will try this today. Thanks! |
@andreas-aeschlimann I could re-establish the class hierarchy that I had to limit because of a bug in a previous version of Could you confirm that an inheritance like the following is correct:
@JsonProperty("@type", String)
type: string = ""; So all subclasses of Also it should now be possible to define a decorator like
@JsonProperty(Constants.HasPermissions, String, true)
hasPermissions?: string = undefined; and
@JsonProperty(Constants.HasPermissions, String)
hasPermissions: string = ""; on siblings without conflicts. |
Yes, this should work without problems now. |
Closes #159