Examples of JsonSchemaDocs


Examples of com.atlassian.json.schema.doclet.model.JsonSchemaDocs

    public static boolean start(RootDoc rootDoc) throws Exception
    {
        final String output = getOptionArg(rootDoc.options(), OPTION_OUTPUT);

        JsonSchemaDocs rootSchemaDocs = new JsonSchemaDocs();
        List<SchemaClassDoc> schemaClassDocs = new ArrayList<SchemaClassDoc>();

        for (ClassDoc classDoc : rootDoc.classes())
        {
            SchemaClassDoc schemaClassDoc = new SchemaClassDoc();
            schemaClassDoc.setClassName(classDoc.qualifiedTypeName());
            schemaClassDoc.setClassDoc(getDocWithIncludes(classDoc));
            schemaClassDoc.setClassTitle(getTitle(classDoc));

            List<SchemaFieldDoc> schemaFieldDocs = new ArrayList<SchemaFieldDoc>();

            addFieldDocs(classDoc, schemaFieldDocs, new HashMap<String, String>());


            schemaClassDoc.setFieldDocs(schemaFieldDocs);

            schemaClassDocs.add(schemaClassDoc);
        }

        rootSchemaDocs.setClassDocs(schemaClassDocs);

        Gson gson = new Gson();

        try
        {
View Full Code Here

Examples of com.atlassian.json.schema.doclet.model.JsonSchemaDocs

    public void testCommonAttrs() throws Exception
    {
        JsonSchemaGenerator generator = new DefaultJsonSchemaGeneratorProvider().provide(
                EnumCase.LOWER
                , new InterfaceListBuilder().build()
                , new JsonSchemaDocs()
                ,""
        );

        Gson gson = new GsonBuilder()
                .setPrettyPrinting()
View Full Code Here

Examples of com.atlassian.json.schema.doclet.model.JsonSchemaDocs

    public void testInheritance() throws Exception
    {
        JsonSchemaGenerator generator = new DefaultJsonSchemaGeneratorProvider().provide(
                EnumCase.LOWER
                , new InterfaceListBuilder().build()
                , new JsonSchemaDocs()
                ,""
        );

        Gson gson = new GsonBuilder()
                .setPrettyPrinting()
View Full Code Here

Examples of com.atlassian.json.schema.doclet.model.JsonSchemaDocs

    public void testStringAttrs() throws Exception
    {
        JsonSchemaGenerator generator = new DefaultJsonSchemaGeneratorProvider().provide(
                EnumCase.LOWER
                , new InterfaceListBuilder().build()
                , new JsonSchemaDocs()
                ,""
        );

        Gson gson = new GsonBuilder()
                .setPrettyPrinting()
View Full Code Here

Examples of com.atlassian.json.schema.doclet.model.JsonSchemaDocs

    public void testNumericAttrs() throws Exception
    {
        JsonSchemaGenerator generator = new DefaultJsonSchemaGeneratorProvider().provide(
                EnumCase.LOWER
                , new InterfaceListBuilder().build()
                , new JsonSchemaDocs()
                ,""
        );

        Gson gson = new GsonBuilder()
                .setPrettyPrinting()
View Full Code Here

Examples of com.atlassian.json.schema.doclet.model.JsonSchemaDocs

    public void testArrayAttrs() throws Exception
    {
        JsonSchemaGenerator generator = new DefaultJsonSchemaGeneratorProvider().provide(
                EnumCase.LOWER
                , new InterfaceListBuilder().build()
                , new JsonSchemaDocs()
                ,""
        );

        Gson gson = new GsonBuilder()
                .setPrettyPrinting()
View Full Code Here

Examples of com.atlassian.json.schema.doclet.model.JsonSchemaDocs

    public void testObjectAttrs() throws Exception
    {
        JsonSchemaGenerator generator = new DefaultJsonSchemaGeneratorProvider().provide(
                EnumCase.LOWER
                , new InterfaceListBuilder().build()
                , new JsonSchemaDocs()
                ,""
        );

        Gson gson = new GsonBuilder()
                .setPrettyPrinting()
View Full Code Here

Examples of com.atlassian.json.schema.doclet.model.JsonSchemaDocs

        classDoc.setClassDoc("Food is good, you should eat it");
        classDoc.setFieldDocs(fieldDocs);
       
        classDocs.add(classDoc);
       
        JsonSchemaDocs schemaDocs = new JsonSchemaDocs();
        schemaDocs.setClassDocs(classDocs);
       
        return schemaDocs;
    }
View Full Code Here

Examples of com.atlassian.json.schema.doclet.model.JsonSchemaDocs

        {
            Gson gson = new GsonBuilder().setFieldNamingStrategy(new SchemaFieldNamingStrategy()).create();
            Gson prettyGson = new GsonBuilder().setPrettyPrinting().setFieldNamingStrategy(new SchemaFieldNamingStrategy()).create();
           
            JsonSchemaGeneratorProvider provider = getProvider();
            JsonSchemaDocs schemaDocs = new JsonSchemaDocs();
            InterfaceList interfaceList = new InterfaceList();
           
            File docsFile = new File(getDefaultDocsFile());
            File interfacesFile = new File(getDefaultInterfacesFile());
View Full Code Here

Examples of com.atlassian.json.schema.doclet.model.JsonSchemaDocs

public class DefaultJsonSchemaGenerator extends AbstractJsonSchemaGenerator
{

    public DefaultJsonSchemaGenerator()
    {
        this(EnumCase.UPPER, new InterfaceList(), new JsonSchemaDocs(), null);
    }
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.