Examples of SwaggerModel


Examples of org.amdatu.web.rest.doc.swagger.model.SwaggerModel

        // See section 3.3.1 of the JAX-RS specification v1.1...
        Method[] methods = clazz.getMethods();
        Arrays.sort(methods, COMPARATOR);

        SwaggerModel models = new SwaggerModel();
        List<SwaggerAPIPath> apis = new ArrayList<SwaggerAPIPath>();

        for (Method method : methods) {
            if (method.isAnnotationPresent(NoDocumentation.class)) {
                // Do not create documentation for this method...
View Full Code Here

Examples of org.amdatu.web.rest.doc.swagger.model.SwaggerModel

        // See section 3.3.1 of the JAX-RS specification v1.1...
        Method[] methods = clazz.getMethods();
        Arrays.sort(methods, COMPARATOR);

        SwaggerModel models = new SwaggerModel();
        List<SwaggerAPIPath> apis = new ArrayList<SwaggerAPIPath>();

        for (Method method : methods) {
            if (method.isAnnotationPresent(NoDocumentation.class)) {
                // Do not create documentation for this method...
View Full Code Here

Examples of org.amdatu.web.rest.doc.swagger.model.SwaggerModel

    /**
     * Tests that we can convert types with circular references correctly to a Swagger model.
     */
    public void testConvertCircularReferenceOk() {
        SwaggerModel models = new SwaggerModel();

        convertToSwaggerType(models, TreeNode.class);

        // Only TreeNode
        assertEquals(1, models.size());

        assertModelType(models, TreeNode.class.getName(), //
            "m_parent", TreeNode.class.getName(), null);
    }
View Full Code Here

Examples of org.amdatu.web.rest.doc.swagger.model.SwaggerModel

    /**
     * Tests that we can convert various common types used in Java.
     */
    public void testConvertTypesOk() {
        SwaggerModel models = new SwaggerModel();

        convertToSwaggerType(models, TypeExamples.class);

        // Status & TypeExamples
        assertEquals(2, models.size());

        assertModelType(models, TypeExamples.class.getName(), //
            "m_primitiveInt", "integer", null, // int32
            "m_primitiveLong", "integer", null, // int64
            "m_primitiveInts", "array", "integer", // int32
View Full Code Here

Examples of org.amdatu.web.rest.doc.swagger.model.SwaggerModel

    /**
     * Tests the documentation of correctly annotated operations works as expected.
     */
    public void testDocumentGetStuffOperationOk() throws Exception {
        SwaggerModel models = new SwaggerModel();

        Method method = TypeExamples.class.getMethod("getStuff", Status.class, long.class, TreeNode.class);

        List<SwaggerOperation> doc = documentOperations(models, method);
        assertNotNull(doc);
View Full Code Here

Examples of org.amdatu.web.rest.doc.swagger.model.SwaggerModel

    /**
     * Tests the documentation of correctly annotated operations works as expected.
     */
    public void testDocumentWaitMethodOk() throws Exception {
        SwaggerModel models = new SwaggerModel();

        Method method = TypeExamples.class.getMethod("wait");

        List<SwaggerOperation> doc = documentOperations(models, method);
        assertNotNull(doc);
View Full Code Here

Examples of org.amdatu.web.rest.doc.swagger.model.SwaggerModel

    /**
     * Tests the documentation of method parameters works as expected.
     */
    public void testDocumentParametersOk() throws Exception {
        SwaggerModel models = new SwaggerModel();

        Method method = TypeExamples.class.getMethod("getStuff", Status.class, long.class, TreeNode.class);

        List<SwaggerParameter> doc = documentParameters(models, method);
        assertNotNull(doc);
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.