Example usage for com.fasterxml.jackson.module.jsonSchema.types ObjectSchema ObjectSchema

List of usage examples for com.fasterxml.jackson.module.jsonSchema.types ObjectSchema ObjectSchema

Introduction

In this page you can find the example usage for com.fasterxml.jackson.module.jsonSchema.types ObjectSchema ObjectSchema.

Prototype

public ObjectSchema() 

Source Link

Usage

From source file:org.brutusin.json.impl.JacksonSchemaFactory.java

@Override
public ObjectSchema objectSchema() {
    return new ObjectSchema() {
        @com.fasterxml.jackson.annotation.JsonProperty("default")
        private Object def;
        @com.fasterxml.jackson.annotation.JsonProperty("enum")
        private List values;
        @com.fasterxml.jackson.annotation.JsonProperty
        private IndexableProperty.IndexMode index;
        @com.fasterxml.jackson.annotation.JsonProperty
        private String[] dependsOn;

        @JsonIgnore//from w  w w  .  ja  v a2s. c  om
        public String id;

        @JsonIgnore
        @Override
        public String getId() {
            return super.getId();
        }

        public String[] getDependsOn() {
            return dependsOn;
        }

        public void setDependsOn(String[] dependsOn) {
            this.dependsOn = dependsOn;
        }

        public Object getDef() {
            return def;
        }

        public void setDef(Object def) {
            this.def = def;
        }

        public List getValues() {
            return values;
        }

        public void setValues(List values) {
            this.values = values;
        }

        public IndexableProperty.IndexMode getIndex() {
            return index;
        }

        public void setIndex(IndexableProperty.IndexMode index) {
            this.index = index;
        }

        @Override
        public void enrichWithBeanProperty(BeanProperty beanProperty) {
            enrich(this, beanProperty);
        }
    };
}