Package org.codehaus.enunciate.contract.json

Examples of org.codehaus.enunciate.contract.json.JsonSchemaInfo


      for (RootElementDeclaration element : info.getGlobalElements()) {
        facets.addAll(element.getFacets());
      }
    }
    else if (JsonSchemaInfo.class.isInstance(unwrapped)) {
      JsonSchemaInfo schema = (JsonSchemaInfo) unwrapped;
      for (JsonTypeDefinition jsonTypeDefinition : schema.getTypes()) {
        gatherFacets(jsonTypeDefinition, facets);
      }
    }
    else if (WsdlInfo.class.isInstance(unwrapped)) {
      WsdlInfo wsdl = (WsdlInfo) unwrapped;
View Full Code Here


      FreemarkerModel.set(model);
      final JsonTypeDefinition nameTypeDefinition = JsonTypeDefinition.createTypeDefinition((ClassDeclaration) getDeclaration("org.codehaus.enunciate.samples.json.Name"));
      assertNull(model.findJsonTypeDefinition(nameTypeDefinition));
      model.addJsonType(nameTypeDefinition);
      assertNotNull(model.findJsonTypeDefinition(nameTypeDefinition));
      JsonSchemaInfo jsonSchemaInfo = model.getIdsToJsonSchemas().get(JsonSchemaInfo.schemaIdForType(nameTypeDefinition));
      assertNotNull(jsonSchemaInfo);
      assertNotNull(jsonSchemaInfo.getTypesByName().get(nameTypeDefinition.getTypeName()));
      assertNull(jsonSchemaInfo.getTopLevelTypesByName().get(nameTypeDefinition.getTypeName()));
  }
View Full Code Here

      assertNull(model.findJsonRootElementDeclaration(rootElementDeclaration));
      model.addJsonRootElement(rootElementDeclaration);
      assertNotNull(model.findJsonRootElementDeclaration(rootElementDeclaration));
      assertNotNull(model.findJsonTypeDefinition(nameTypeDefinition));

      JsonSchemaInfo jsonSchemaInfo = model.getIdsToJsonSchemas().get(JsonSchemaInfo.schemaIdForType(nameTypeDefinition));
      assertNotNull(jsonSchemaInfo);
      assertNotNull(jsonSchemaInfo.getTypesByName().get(nameTypeDefinition.getTypeName()));
      assertNotNull(jsonSchemaInfo.getTopLevelTypesByName().get(nameTypeDefinition.getTypeName()));
  }
View Full Code Here

TOP

Related Classes of org.codehaus.enunciate.contract.json.JsonSchemaInfo

Copyright © 2018 www.massapicom. 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.