Example usage for com.fasterxml.jackson.module.jsonSchema JsonSchema isObjectSchema

List of usage examples for com.fasterxml.jackson.module.jsonSchema JsonSchema isObjectSchema

Introduction

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

Prototype

@JsonIgnore
public boolean isObjectSchema() 

Source Link

Document

determine if this JsonSchema is an ObjectSchema .

Usage

From source file:io.syndesis.inspector.JsonSchemaInspector.java

static void fetchPaths(final String context, final List<String> paths,
        final Map<String, JsonSchema> properties) {
    for (final Entry<String, JsonSchema> entry : properties.entrySet()) {
        final JsonSchema subschema = entry.getValue();

        String path;/*www .ja va2  s  .  c  o m*/
        final String key = entry.getKey();
        if (context == null) {
            path = key;
        } else {
            path = context + "." + key;
        }

        if (subschema.isValueTypeSchema()) {
            paths.add(path);
        } else if (subschema.isObjectSchema()) {
            fetchPaths(path, paths, ((ObjectSchema) subschema).getProperties());
        }
    }
}