-
Notifications
You must be signed in to change notification settings - Fork 472
Feature/affordances #340
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
Feature/affordances #340
Conversation
Some initial observations:
|
@dschulten @olivergierke 👍 for pushing this forward. Let me know if I can help in any way. I'm interested in this from the angle of adding hypermedia support for swagger (unlike the url centric wall of operations approach that it provides of the box.) |
organized imports
organized imports
…o feature/affordances Conflicts: src/main/java/de/escalon/hypermedia/action/Input.java
@dilipkrish it would be helpful if you start using the AffordanceBuilder for your intended purpose to see if the descriptors contained in the Affordance contain everything you need. |
|
moved HTML5 input String constants from AnnotatedParameter to @input reviewed Javadoc for Html specifics, clarified usage of Options interface
Added bootstrap classes for form controls See https://github.com/dschulten/hydra-java/blob/master/hydra-sample/service/src/main/java/de/escalon/hypermedia/sample/Config.java#L67 for an example how to set up for bootstrap
write and read form input field names as property paths to support nested beans
Added support for Uber.templated Render model only for POST, PUT, PATCH
organized imports
organized imports
Moved AffordanceModelFactory into core package as it's SPI. Switched to Spring Factories lookup of implementation classes so that we avoid a package dependency between the MVC package and the media type specific packages. Removed reference to MediaType from AffordanceModelFactory to AffordanceModel so that a factory can even provide models for different MediaTypes (i.e. different flavors of the same one, e.g. HAL Forms for JSON and XML). Also removed addAffordanceModel(…) from Affordance to not force the implementations into mutability. Made most of the affordance building API types package protected. HalFormsAffordanceModel now uses MethodParameters abstraction to simplify model parsing code. Tweaked HAL forms model to work with factory methods for required properties and wither methods to add optional properties. Tweaked and inlined mixin types in Jackson module for HAL forms. Slight API polishing on Link to make sure Affordance collecting methods are not named with…. Tweaked Lombok setup to use all caps for logger constants. Removed deprecation warnings in Jackson2HalModule.
Moved AffordanceModelFactory into core package as it's SPI. Switched to Spring Factories lookup of implementation classes so that we avoid a package dependency between the MVC package and the media type specific packages. Removed reference to MediaType from AffordanceModelFactory to AffordanceModel so that a factory can even provide models for different MediaTypes (i.e. different flavors of the same one, e.g. HAL Forms for JSON and XML). Also removed addAffordanceModel(…) from Affordance to not force the implementations into mutability. Made most of the affordance building API types package protected. HalFormsAffordanceModel now uses MethodParameters abstraction to simplify model parsing code. Tweaked HAL forms model to work with factory methods for required properties and wither methods to add optional properties. Tweaked and inlined mixin types in Jackson module for HAL forms. Slight API polishing on Link to make sure Affordance collecting methods are not named with…. Tweaked Lombok setup to use all caps for logger constants. Removed deprecation warnings in Jackson2HalModule.
Used IDE to migrate several Java 6 constructors to Java 8.
Side effect of upgrading Jackson appears to be arbitrary change in order of property serialization. This commit forces the order to match the spec and fixes the related test cases.
Side effect of upgrading Jackson appears to be arbitrary change in order of property serialization. This commit forces the order to match the spec and fixes the related test cases.
Moved AffordanceModelFactory into core package as it's SPI. Switched to Spring Factories lookup of implementation classes so that we avoid a package dependency between the MVC package and the media type specific packages. Removed reference to MediaType from AffordanceModelFactory to AffordanceModel so that a factory can even provide models for different MediaTypes (i.e. different flavors of the same one, e.g. HAL Forms for JSON and XML). Also removed addAffordanceModel(…) from Affordance to not force the implementations into mutability. Made most of the affordance building API types package protected. HalFormsAffordanceModel now uses MethodParameters abstraction to simplify model parsing code. Tweaked HAL forms model to work with factory methods for required properties and wither methods to add optional properties. Tweaked and inlined mixin types in Jackson module for HAL forms. Slight API polishing on Link to make sure Affordance collecting methods are not named with…. Tweaked Lombok setup to use all caps for logger constants. Removed deprecation warnings in Jackson2HalModule.
Used IDE to migrate several Java 6 constructors to Java 8.
Side effect of upgrading Jackson appears to be arbitrary change in order of property serialization. This commit forces the order to match the spec and fixes the related test cases.
Moved AffordanceModelFactory into core package as it's SPI. Switched to Spring Factories lookup of implementation classes so that we avoid a package dependency between the MVC package and the media type specific packages. Removed reference to MediaType from AffordanceModelFactory to AffordanceModel so that a factory can even provide models for different MediaTypes (i.e. different flavors of the same one, e.g. HAL Forms for JSON and XML). Also removed addAffordanceModel(…) from Affordance to not force the implementations into mutability. Made most of the affordance building API types package protected. HalFormsAffordanceModel now uses MethodParameters abstraction to simplify model parsing code. Tweaked HAL forms model to work with factory methods for required properties and wither methods to add optional properties. Tweaked and inlined mixin types in Jackson module for HAL forms. Slight API polishing on Link to make sure Affordance collecting methods are not named with…. Tweaked Lombok setup to use all caps for logger constants. Removed deprecation warnings in Jackson2HalModule.
Used IDE to migrate several Java 6 constructors to Java 8.
Side effect of upgrading Jackson appears to be arbitrary change in order of property serialization. This commit forces the order to match the spec and fixes the related test cases.
More Java 8 related cleanups (diamond operator etc.).
Superceded by #612 and resolved via 70448a8. Final solution isn't precisely the same thing, but we plan to iterate over it in the near future and expand to support other mediatypes. Feel free to check the HAL-FORMS section of code and their corresponding unit tests. Also, see monitor Spring HATEOAS Examples repo as we plan to add an Affordances example very soon. |
@dschulten Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
1 similar comment
@dschulten Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
Initial version of Affordance and AffordanceBuilder for spring-hateoas. Still everything in the original packages and with the original copyright notice, as discussed. To be decided if a message converter using Affordance should be in spring-hateoas and if so, which one. Uber[1] and Html[2] are candidates, but maybe it would be good if we start a different converter to work with Affordance from scratch.
[1] http://tinyurl.com/nslmlha
[2] http://tinyurl.com/ojmqfkg