mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
19.14.2016 32271a6f82042a2d83c7292002cd09f6f56b4e50
refs
author Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, September 19, 2016 11:14 +0200
committer Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Thursday, September 22, 2016 10:43 +0200
commit32271a6f82042a2d83c7292002cd09f6f56b4e50
tree 5238f265619e1fa4a16d0d01592ca13c71672d5f tree | zip | gz
parent f2da7665651bbf38bc7108460df26b960a04f5cd view | diff
OPENDJ-3246 Support polymorphism in CREST API and OpenAPI descriptors

Addressing review comments from previous pull requests.

Resources.java:
In buildJsonSchema(), add the "discriminator" property to the JSON schema
and if a superType exists, then return a JSON schema using the "allOf" property.
In definitions(), output all the resources from the type hierarchy: all superTypes and subTypes
Replaced all uses of "allProperties" field by "declaredProperties" field when dealing with API descriptor.

ResourceTypePropetyMapper.java:
In isRequired(), now return true because the discriminator is a required property in JSON schemas.

opendj-bom/pom.xml:
Need to tmporarily depend on SNAPSHOTS for forgerock-commons
until all work on forgerock-commons is finished and a new release exists.
4 files modified
86 ■■■■ changed files
opendj-bom/pom.xml 2 ●●● diff | view | raw | blame | history
opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/Resource.java 81 ●●●● diff | view | raw | blame | history
opendj-rest2ldap/src/main/java/org/forgerock/opendj/rest2ldap/ResourceTypePropertyMapper.java 2 ●●● diff | view | raw | blame | history
opendj-rest2ldap/src/test/java/org/forgerock/opendj/rest2ldap/Rest2LdapJsonConfiguratorTest.java 1 ●●●● diff | view | raw | blame | history