Skip to content

Mechanism required to customize schema for object property #18

Closed
@rpdai

Description

@rpdai

If I have a custom annotation on the property of an object, this cannot be visited as the JsonFormatVisitorWrapper takes only the type of the property. I've looked also at subclassing ObjectSchema but since this takes the property name as a String only, seems I'd have to do some reflection to get back to the property itself.

I can see a significant number of use cases of wanting to customize a schema being related to the information associated with an object property (custom annotations, documentation, validation, etc.). My particular use-case is that the schema should provide some information for client-side validation, from the bean validation API.

I've seen threads suggesting that this would be possible (http://jackson-users.ning.com/forum/topics/json-schema-generation-with-jackson-module-jsonschema, http://jackson-users.ning.com/forum/topics/handling-a-custom-annotation-when-generating-json-schema) but I can't see it, myself.

Is there some mechanism I'm missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions