Examples of CanonicalSchemaTree


Examples of com.github.fge.jsonschema.core.tree.CanonicalSchemaTree

        final ObjectNode schema = FACTORY.objectNode();
        schema.put("not", FACTORY.objectNode());

        final SchemaTree tree
            = new CanonicalSchemaTree(SchemaKey.anonymousKey(), schema);
        final JsonTree instance = new SimpleJsonTree(FACTORY.nullNode());
        data = new FullData(tree, instance);
        report = mock(ProcessingReport.class);
        when(report.getLogLevel()).thenReturn(LogLevel.DEBUG);
    }
View Full Code Here

Examples of com.github.fge.jsonschema.core.tree.CanonicalSchemaTree

    @Test
    public void childrenAreNotExploredByDefaultIfContainerFails()
        throws ProcessingException
    {
        final SchemaTree schema
            = new CanonicalSchemaTree(SchemaKey.anonymousKey(), RAWSCHEMA);
        final JsonTree instance = new SimpleJsonTree(RAWINSTANCE);
        final FullData data = new FullData(schema, instance);
        final ProcessingReport report = mock(ProcessingReport.class);
        processor.process(report, data);
        assertEquals(COUNT.get(), 0);
View Full Code Here

Examples of com.github.fge.jsonschema.core.tree.CanonicalSchemaTree

    @Test
    public void childrenAreExploredOnDemandEvenIfContainerFails()
        throws ProcessingException
    {
        final SchemaTree schema
            = new CanonicalSchemaTree(SchemaKey.anonymousKey(), RAWSCHEMA);
        final JsonTree instance = new SimpleJsonTree(RAWINSTANCE);
        final FullData data = new FullData(schema, instance, true);
        final ProcessingReport report = mock(ProcessingReport.class);
        processor.process(report, data);
        assertEquals(COUNT.get(), 1);
View Full Code Here

Examples of com.github.fge.jsonschema.core.tree.CanonicalSchemaTree

        InstantiationException
    {
        if (constructor == null)
            return;

        final SchemaTree tree = new CanonicalSchemaTree(
            SchemaKey.anonymousKey(), generateSchema());
        final JsonTree instance = new SimpleJsonTree(generateInstance());
        data = new FullData(tree, instance);
        report = mock(ProcessingReport.class);
        when(report.getLogLevel()).thenReturn(LogLevel.DEBUG);
View Full Code Here

Examples of com.github.fge.jsonschema.core.tree.CanonicalSchemaTree

    }

    private static ValueHolder<SchemaTree> holder(final JsonNode node)
    {
        return ValueHolder.<SchemaTree>hold("schema",
            new CanonicalSchemaTree(SchemaKey.anonymousKey(), node));
    }
View Full Code Here

Examples of com.github.fge.jsonschema.tree.CanonicalSchemaTree

        final JsonNode schemaNode = ret.remove(Response.SCHEMA);

        if (invalidSchema)
            return ret;

        final SchemaTree tree = new CanonicalSchemaTree(schemaNode);
        final SchemaHolder holder = new SchemaHolder(tree);
        final ListProcessingReport report = new ListProcessingReport();

        PROCESSOR.process(report, holder);
        final boolean success = report.isSuccess();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.