-
Notifications
You must be signed in to change notification settings - Fork 26
Fixes #29: Make getDeclarationByName work with type expressions #30
Conversation
This PR needs to be updated a little.
|
@@ -27,8 +27,8 @@ val settings = Common.settings ++ Common.publish ++ Seq( | |||
credentials ++= Common.credentials(), | |||
libraryDependencies ++= Seq( | |||
"org.scalatest" %%% "scalatest" % "3.0.5" % "test", | |||
"com.github.amlorg" %%% "amf-webapi" % "3.2.1", | |||
"com.github.amlorg" %%% "amf-validation" % "3.2.1" | |||
"com.github.amlorg" %%% "amf-webapi" % "3.2.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
latest is 3.3.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jstoiko can we make this upgrade in a separate PR?
Release 3.3.0 adds breaking changes (section "Interface Changes") which may break things in webapi-parser code and/or examples. There will be too much in this PR if we fix migration issues here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also see aml-org/amf#542
Done reworking the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm glad you added tests and encovered a new bug (the one you reported in AMF). Good catch!
Fixes #29
Things that need to be done after changes of this PR are released:
Breaking changes
This PR presents potentially breaking changes for Java users. In particular
WebApiBaseUnit.getDeclarationByName
now returns an instance ofamf.client.model.domain.AnyShape
instead ofamf.client.model.domain.NodeShape
. Note thatNodeShape
is a subclass ofAnyShape
as API docs state.Considering this, you might need to explicitly convert an instance of
AnyShape
returned byWebApiBaseUnit.getDeclarationByName
to its subclasses to access subclass-specific properties.E.g. to access UnionShape.anyOf property you would have to do:
JS users should face no breaking changes.