Package org.codehaus.enunciate.contract.json

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


        model.addJsonType(typeDefinition);

        if(typeDefinition.getDelegate().getAnnotation(JsonRootType.class) != null)
        {
          debug("%s to be considered as a root element", typeDefinition.getTypeName());
          model.addJsonRootElement(new JsonRootElementDeclaration(typeDefinition));
        }
      }
      else {
        debug("%s is a potential schema type definition, but we're not going to add it directly to the model. (It could still be indirectly added, though.)", typeDefinition.getTypeName());
      }
View Full Code Here


  {
      EnunciateFreemarkerModel model = new EnunciateFreemarkerModel();
      FreemarkerModel.set(model);

      final JsonTypeDefinition nameTypeDefinition = JsonTypeDefinition.createTypeDefinition((ClassDeclaration) getDeclaration("org.codehaus.enunciate.samples.json.Name"));
      final JsonRootElementDeclaration rootElementDeclaration = new JsonRootElementDeclaration(nameTypeDefinition);

      assertNull(model.findJsonRootElementDeclaration(rootElementDeclaration));
      model.addJsonRootElement(rootElementDeclaration);
      assertNotNull(model.findJsonRootElementDeclaration(rootElementDeclaration));
      assertNotNull(model.findJsonTypeDefinition(nameTypeDefinition));
View Full Code Here

TOP

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

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.