Search in sources :

Example 11 with Explode

use of io.swagger.v3.oas.annotations.enums.Explode in project dotwebstack-framework by dotwebstack.

the class DefaultParamHandlerTest method mockObjectParameter.

@SuppressWarnings({ "rawtypes" })
private void mockObjectParameter(String name, Map<String, String> propertyTypes, String format, boolean explode, Parameter.StyleEnum style) {
    when(parameter.getName()).thenReturn(name);
    when(parameter.getExplode()).thenReturn(explode);
    when(parameter.getStyle()).thenReturn(style);
    Schema schema = mock(Schema.class);
    when(schema.getType()).thenReturn(OBJECT_TYPE);
    Map<String, Schema> properties = propertyTypes.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> mockScalarSchema(e.getValue())));
    when(schema.getProperties()).thenReturn(properties);
    when(schema.getEnum()).thenReturn(null);
    when(parameter.getSchema()).thenReturn(schema);
    when(schema.getFormat()).thenReturn(format);
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Strictness(org.mockito.quality.Strictness) BeforeEach(org.junit.jupiter.api.BeforeEach) MockitoSettings(org.mockito.junit.jupiter.MockitoSettings) Mock(org.mockito.Mock) Parameter(io.swagger.v3.oas.models.parameters.Parameter) ArraySchema(io.swagger.v3.oas.models.media.ArraySchema) PARAM_HEADER_TYPE(org.dotwebstack.framework.service.openapi.helper.OasConstants.PARAM_HEADER_TYPE) OBJECT_TYPE(org.dotwebstack.framework.service.openapi.helper.OasConstants.OBJECT_TYPE) BigDecimal(java.math.BigDecimal) ImmutableList(com.google.common.collect.ImmutableList) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) Is.is(org.hamcrest.core.Is.is) Schema(io.swagger.v3.oas.models.media.Schema) BigInteger(java.math.BigInteger) ARRAY_TYPE(org.dotwebstack.framework.service.openapi.helper.OasConstants.ARRAY_TYPE) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) TestResources(org.dotwebstack.framework.service.openapi.TestResources) ImmutableMap(com.google.common.collect.ImmutableMap) PathItem(io.swagger.v3.oas.models.PathItem) MultiValueMap(org.springframework.util.MultiValueMap) Mockito.when(org.mockito.Mockito.when) Collectors(java.util.stream.Collectors) ServerRequest(org.springframework.web.reactive.function.server.ServerRequest) Test(org.junit.jupiter.api.Test) PARAM_QUERY_TYPE(org.dotwebstack.framework.service.openapi.helper.OasConstants.PARAM_QUERY_TYPE) List(java.util.List) StringSchema(io.swagger.v3.oas.models.media.StringSchema) PARAM_PATH_TYPE(org.dotwebstack.framework.service.openapi.helper.OasConstants.PARAM_PATH_TYPE) Optional(java.util.Optional) ParameterValidationException(org.dotwebstack.framework.service.openapi.exception.ParameterValidationException) ObjectSchema(io.swagger.v3.oas.models.media.ObjectSchema) Assertions.assertDoesNotThrow(org.junit.jupiter.api.Assertions.assertDoesNotThrow) LinkedMultiValueMap(org.springframework.util.LinkedMultiValueMap) Mockito.mock(org.mockito.Mockito.mock) ArraySchema(io.swagger.v3.oas.models.media.ArraySchema) Schema(io.swagger.v3.oas.models.media.Schema) StringSchema(io.swagger.v3.oas.models.media.StringSchema) ObjectSchema(io.swagger.v3.oas.models.media.ObjectSchema) Map(java.util.Map) ImmutableMap(com.google.common.collect.ImmutableMap) MultiValueMap(org.springframework.util.MultiValueMap) LinkedMultiValueMap(org.springframework.util.LinkedMultiValueMap)

Example 12 with Explode

use of io.swagger.v3.oas.annotations.enums.Explode in project dotwebstack-framework by dotwebstack.

the class DefaultParamHandlerTest method mockParameter.

@SuppressWarnings({ "rawtypes", "unchecked" })
private void mockParameter(String name, String type, String subType, String format, boolean explode, Parameter.StyleEnum style) {
    when(parameter.getName()).thenReturn(name);
    when(parameter.getExplode()).thenReturn(explode);
    when(parameter.getStyle()).thenReturn(style);
    Schema schema;
    switch(type) {
        case ARRAY_TYPE:
            ArraySchema arraySchema = mock(ArraySchema.class);
            Schema itemSchema = mockScalarSchema(subType);
            when(itemSchema.getEnum()).thenReturn(null);
            when(arraySchema.getItems()).thenReturn(itemSchema);
            schema = arraySchema;
            break;
        case OBJECT_TYPE:
            schema = mock(ObjectSchema.class);
            break;
        default:
            schema = mockScalarSchema(type);
    }
    when(schema.getEnum()).thenReturn(null);
    when(parameter.getSchema()).thenReturn(schema);
    when(schema.getType()).thenReturn(type);
    when(schema.getFormat()).thenReturn(format);
}
Also used : ArraySchema(io.swagger.v3.oas.models.media.ArraySchema) ObjectSchema(io.swagger.v3.oas.models.media.ObjectSchema) ArraySchema(io.swagger.v3.oas.models.media.ArraySchema) Schema(io.swagger.v3.oas.models.media.Schema) StringSchema(io.swagger.v3.oas.models.media.StringSchema) ObjectSchema(io.swagger.v3.oas.models.media.ObjectSchema)

Example 13 with Explode

use of io.swagger.v3.oas.annotations.enums.Explode in project vertx-web by vert-x3.

the class OpenAPI3PathResolver method solve.

/**
 * This method returns a pattern only if a pattern is needed, otherwise it returns an empty optional
 *
 * @return
 */
public Optional<Pattern> solve() {
    if (ILLEGAL_PATH_MATCHER.matcher(oasPath).matches())
        throw new RouterFactoryException("Path template not supported", RouterFactoryException.ErrorType.INVALID_SPEC_PATH);
    Matcher parametersMatcher = OAS_PATH_PARAMETERS_PATTERN.matcher(oasPath);
    if (!parameters.isEmpty() && parametersMatcher.find()) {
        // Need to create a specific match pattern with path parameters and some string manipulation magic
        StringBuilder regex = new StringBuilder();
        int lastMatchEnd = 0;
        boolean endSlash = oasPath.charAt(oasPath.length() - 1) == '/';
        parametersMatcher.reset();
        int i = 0;
        while (parametersMatcher.find()) {
            // Append constant string
            String toQuote = oasPath.substring(lastMatchEnd, parametersMatcher.start());
            if (toQuote.length() != 0)
                regex.append(Pattern.quote(toQuote));
            lastMatchEnd = parametersMatcher.end();
            String paramName = parametersMatcher.group(1);
            Optional<Parameter> parameterOptional = parameters.stream().filter(p -> p.getName().equals(paramName)).findFirst();
            if (parameterOptional.isPresent()) {
                // For every parameter style I have to generate a different regular expression
                Parameter parameter = parameterOptional.get();
                String style = solveParamStyle(parameter);
                boolean explode = solveParamExplode(parameter);
                boolean isObject = OpenApi3Utils.isParameterObjectOrAllOfType(parameter);
                boolean isArray = OpenApi3Utils.isParameterArrayType(parameter);
                String groupName = "p" + i;
                if (style.equals("simple")) {
                    regex.append(RegexBuilder.create().namedGroup(groupName, RegexBuilder.create().notCharactersClass("!", "*", "'", "(", ")", ";", "@", "&", "+", "$", "/", "?", "#", "[", "]", (shouldThreatDotAsReserved) ? "." : null).zeroOrMore()).zeroOrOne());
                    mappedGroups.put(groupName, paramName);
                } else if (style.equals("label")) {
                    if (isObject && explode) {
                        Map<String, OpenApi3Utils.ObjectField> properties = OpenApi3Utils.solveObjectParameters(parameter.getSchema());
                        for (Map.Entry<String, OpenApi3Utils.ObjectField> entry : properties.entrySet()) {
                            groupName = "p" + i;
                            regex.append(RegexBuilder.create().optionalGroup(RegexBuilder.create().escapeCharacter(".").zeroOrOne().quote(entry.getKey()).append("=").namedGroup(groupName, RegexBuilder.create().notCharactersClass("!", "*", "'", "(", ")", ";", "@", "&", "+", "$", "/", "?", "#", "[", "]", ".", "=").zeroOrMore())));
                            mappedGroups.put(groupName, entry.getKey());
                            i++;
                        }
                    } else {
                        regex.append(RegexBuilder.create().escapeCharacter(".").zeroOrOne().namedGroup(groupName, RegexBuilder.create().notCharactersClass("!", "*", "'", "(", ")", ";", "@", "&", "=", "+", "$", ",", "/", "?", "#", "[", "]").zeroOrMore()).zeroOrOne());
                        mappedGroups.put(groupName, paramName);
                    }
                } else if (style.equals("matrix")) {
                    if (isObject && explode) {
                        Map<String, OpenApi3Utils.ObjectField> properties = OpenApi3Utils.solveObjectParameters(parameter.getSchema());
                        for (Map.Entry<String, OpenApi3Utils.ObjectField> entry : properties.entrySet()) {
                            groupName = "p" + i;
                            regex.append(RegexBuilder.create().optionalGroup(RegexBuilder.create().escapeCharacter(";").quote(entry.getKey()).append("=").namedGroup(groupName, RegexBuilder.create().notCharactersClass("!", "*", "'", "(", ")", ";", "@", "&", "=", "+", "$", ",", "/", "?", "#", "[", "]", (shouldThreatDotAsReserved) ? "." : null).zeroOrMore())));
                            mappedGroups.put(groupName, entry.getKey());
                            i++;
                        }
                    } else if (isArray && explode) {
                        regex.append(RegexBuilder.create().namedGroup(groupName, RegexBuilder.create().atomicGroup(RegexBuilder.create().append(";").quote(paramName).append("=").notCharactersClass("!", "*", "'", "(", ")", ";", "@", "&", "=", "+", "$", ",", "/", "?", "#", "[", "]", (shouldThreatDotAsReserved) ? "." : null).zeroOrMore()).oneOrMore()));
                        mappedGroups.put(groupName, paramName);
                    } else {
                        regex.append(RegexBuilder.create().append(";").quote(paramName).append("=").namedGroup(groupName, RegexBuilder.create().notCharactersClass("!", "*", "'", "(", ")", ";", "@", "&", "=", "+", "$", "/", "?", "#", "[", "]", (shouldThreatDotAsReserved) ? "." : null).zeroOrMore()).zeroOrOne());
                        mappedGroups.put(groupName, paramName);
                    }
                }
            } else {
                throw RouterFactoryException.createSpecInvalidException("Missing parameter description for parameter name: " + paramName);
            }
            i++;
        }
        String toAppendQuoted = oasPath.substring(lastMatchEnd, (endSlash) ? oasPath.length() - 1 : oasPath.length());
        if (toAppendQuoted.length() != 0)
            regex.append(Pattern.quote(toAppendQuoted));
        if (endSlash)
            regex.append("\\/");
        return Optional.of(Pattern.compile(regex.toString()));
    } else {
        return Optional.empty();
    }
}
Also used : java.util(java.util) Matcher(java.util.regex.Matcher) OpenApi3Utils.safeBoolean(io.vertx.ext.web.api.contract.openapi3.impl.OpenApi3Utils.safeBoolean) Parameter(io.swagger.v3.oas.models.parameters.Parameter) RouterFactoryException(io.vertx.ext.web.api.contract.RouterFactoryException) Pattern(java.util.regex.Pattern) Collectors(java.util.stream.Collectors) Matcher(java.util.regex.Matcher) RouterFactoryException(io.vertx.ext.web.api.contract.RouterFactoryException) Parameter(io.swagger.v3.oas.models.parameters.Parameter)

Example 14 with Explode

use of io.swagger.v3.oas.annotations.enums.Explode in project vertx-web by vert-x3.

the class OpenAPI3MultipleFilesValidationTest method testQueryOptionalFormExplodeObject.

/**
 * Test: query_optional_form_explode_object Expected parameters sent: color:
 * R=100&G=200&B=150&alpha=50 Expected response:
 * {"color":{"R":"100","G":"200","B":"150","alpha":"50"}}
 */
@Test
public void testQueryOptionalFormExplodeObject() throws Exception {
    Operation op = testSpec.getPaths().get("/query/form/explode/object").getGet();
    OpenAPI3RequestValidationHandler validationHandler = new OpenAPI3RequestValidationHandlerImpl(op, op.getParameters(), testSpec, refsCache);
    loadHandlers("/query/form/explode/object", HttpMethod.GET, false, validationHandler, routingContext -> {
        RequestParameters params = routingContext.get("parsedParameters");
        RequestParameter colorQueryParam = params.queryParameter("color");
        assertNotNull(colorQueryParam);
        assertTrue(colorQueryParam.isObject());
        routingContext.response().setStatusCode(200).setStatusMessage("OK").putHeader("content-type", "application/json").end(((JsonObject) colorQueryParam.toJson()).encode());
    });
    String requestURI = "/query/form/explode/object?R=100&G=200&B=150&alpha=50";
    testEmptyRequestWithJSONObjectResponse(HttpMethod.GET, requestURI, 200, "OK", new JsonObject("{\"R\":\"100\",\"G\":\"200\",\"B\":\"150\",\"alpha\":50}"));
}
Also used : OpenAPI3RequestValidationHandlerImpl(io.vertx.ext.web.api.contract.openapi3.impl.OpenAPI3RequestValidationHandlerImpl) RequestParameter(io.vertx.ext.web.api.RequestParameter) JsonObject(io.vertx.core.json.JsonObject) Operation(io.swagger.v3.oas.models.Operation) RequestParameters(io.vertx.ext.web.api.RequestParameters) Test(org.junit.Test)

Example 15 with Explode

use of io.swagger.v3.oas.annotations.enums.Explode in project springdoc-openapi by springdoc.

the class DataRestDelegatingMethodParameterCustomizer method getNewParameterAnnotationForField.

/**
 * Gets new parameter annotation for field.
 *
 * @param methodParameter the method parameter
 * @param pageableDefault the pageable default
 * @return the new parameter annotation for field
 */
private Optional<Annotation> getNewParameterAnnotationForField(MethodParameter methodParameter, PageableDefault pageableDefault) {
    String parameterName = methodParameter.getParameterName();
    Field field;
    Parameter parameterNew;
    try {
        field = methodParameter.getContainingClass().getDeclaredField(parameterName);
        Parameter parameter = field.getAnnotation(Parameter.class);
        parameterNew = new Parameter() {

            @Override
            public Class<? extends Annotation> annotationType() {
                return parameter.annotationType();
            }

            @Override
            public String name() {
                return getName(parameterName, parameter.name());
            }

            @Override
            public ParameterIn in() {
                return parameter.in();
            }

            @Override
            public String description() {
                return parameter.description();
            }

            @Override
            public boolean required() {
                return parameter.required();
            }

            @Override
            public boolean deprecated() {
                return parameter.deprecated();
            }

            @Override
            public boolean allowEmptyValue() {
                return parameter.allowEmptyValue();
            }

            @Override
            public ParameterStyle style() {
                return parameter.style();
            }

            @Override
            public Explode explode() {
                return parameter.explode();
            }

            @Override
            public boolean allowReserved() {
                return parameter.allowReserved();
            }

            @Override
            public Schema schema() {
                return new Schema() {

                    @Override
                    public Class<? extends Annotation> annotationType() {
                        return parameter.schema().annotationType();
                    }

                    @Override
                    public Class<?> implementation() {
                        return parameter.schema().implementation();
                    }

                    @Override
                    public Class<?> not() {
                        return parameter.schema().not();
                    }

                    @Override
                    public Class<?>[] oneOf() {
                        return parameter.schema().oneOf();
                    }

                    @Override
                    public Class<?>[] anyOf() {
                        return parameter.schema().anyOf();
                    }

                    @Override
                    public Class<?>[] allOf() {
                        return parameter.schema().allOf();
                    }

                    @Override
                    public String name() {
                        return parameter.schema().name();
                    }

                    @Override
                    public String title() {
                        return parameter.schema().title();
                    }

                    @Override
                    public double multipleOf() {
                        return parameter.schema().multipleOf();
                    }

                    @Override
                    public String maximum() {
                        return parameter.schema().maximum();
                    }

                    @Override
                    public boolean exclusiveMaximum() {
                        return parameter.schema().exclusiveMaximum();
                    }

                    @Override
                    public String minimum() {
                        return parameter.schema().minimum();
                    }

                    @Override
                    public boolean exclusiveMinimum() {
                        return parameter.schema().exclusiveMaximum();
                    }

                    @Override
                    public int maxLength() {
                        return parameter.schema().maxLength();
                    }

                    @Override
                    public int minLength() {
                        return parameter.schema().minLength();
                    }

                    @Override
                    public String pattern() {
                        return parameter.schema().pattern();
                    }

                    @Override
                    public int maxProperties() {
                        return parameter.schema().maxProperties();
                    }

                    @Override
                    public int minProperties() {
                        return parameter.schema().minProperties();
                    }

                    @Override
                    public String[] requiredProperties() {
                        return parameter.schema().requiredProperties();
                    }

                    @Override
                    public boolean required() {
                        return parameter.schema().required();
                    }

                    @Override
                    public String description() {
                        return parameter.schema().description();
                    }

                    @Override
                    public String format() {
                        return parameter.schema().format();
                    }

                    @Override
                    public String ref() {
                        return parameter.schema().ref();
                    }

                    @Override
                    public boolean nullable() {
                        return parameter.schema().nullable();
                    }

                    @Override
                    public boolean readOnly() {
                        return AccessMode.READ_ONLY.equals(parameter.schema().accessMode());
                    }

                    @Override
                    public boolean writeOnly() {
                        return AccessMode.WRITE_ONLY.equals(parameter.schema().accessMode());
                    }

                    @Override
                    public AccessMode accessMode() {
                        return parameter.schema().accessMode();
                    }

                    @Override
                    public String example() {
                        return parameter.schema().example();
                    }

                    @Override
                    public ExternalDocumentation externalDocs() {
                        return parameter.schema().externalDocs();
                    }

                    @Override
                    public boolean deprecated() {
                        return parameter.schema().deprecated();
                    }

                    @Override
                    public String type() {
                        return parameter.schema().type();
                    }

                    @Override
                    public String[] allowableValues() {
                        return parameter.schema().allowableValues();
                    }

                    @Override
                    public String defaultValue() {
                        return getDefaultValue(parameterName, pageableDefault, parameter.schema().defaultValue());
                    }

                    @Override
                    public String discriminatorProperty() {
                        return parameter.schema().discriminatorProperty();
                    }

                    @Override
                    public DiscriminatorMapping[] discriminatorMapping() {
                        return parameter.schema().discriminatorMapping();
                    }

                    @Override
                    public boolean hidden() {
                        return parameter.schema().hidden();
                    }

                    @Override
                    public boolean enumAsRef() {
                        return parameter.schema().enumAsRef();
                    }

                    @Override
                    public Class<?>[] subTypes() {
                        return parameter.schema().subTypes();
                    }

                    @Override
                    public Extension[] extensions() {
                        return parameter.schema().extensions();
                    }

                    @Override
                    public AdditionalPropertiesValue additionalProperties() {
                        return parameter.schema().additionalProperties();
                    }
                };
            }

            @Override
            public ArraySchema array() {
                ArraySchema arraySchema = parameter.array();
                return new ArraySchema() {

                    @Override
                    public Class<? extends Annotation> annotationType() {
                        return arraySchema.annotationType();
                    }

                    @Override
                    public Schema schema() {
                        return arraySchema.schema();
                    }

                    @Override
                    public Schema arraySchema() {
                        Schema schema = arraySchema.arraySchema();
                        return new Schema() {

                            @Override
                            public Class<? extends Annotation> annotationType() {
                                return schema.annotationType();
                            }

                            @Override
                            public Class<?> implementation() {
                                return schema.implementation();
                            }

                            @Override
                            public Class<?> not() {
                                return schema.not();
                            }

                            @Override
                            public Class<?>[] oneOf() {
                                return schema.oneOf();
                            }

                            @Override
                            public Class<?>[] anyOf() {
                                return schema.anyOf();
                            }

                            @Override
                            public Class<?>[] allOf() {
                                return schema.allOf();
                            }

                            @Override
                            public String name() {
                                return schema.name();
                            }

                            @Override
                            public String title() {
                                return schema.title();
                            }

                            @Override
                            public double multipleOf() {
                                return schema.multipleOf();
                            }

                            @Override
                            public String maximum() {
                                return schema.maximum();
                            }

                            @Override
                            public boolean exclusiveMaximum() {
                                return schema.exclusiveMaximum();
                            }

                            @Override
                            public String minimum() {
                                return schema.minimum();
                            }

                            @Override
                            public boolean exclusiveMinimum() {
                                return schema.exclusiveMinimum();
                            }

                            @Override
                            public int maxLength() {
                                return schema.maxLength();
                            }

                            @Override
                            public int minLength() {
                                return schema.minLength();
                            }

                            @Override
                            public String pattern() {
                                return schema.pattern();
                            }

                            @Override
                            public int maxProperties() {
                                return schema.maxProperties();
                            }

                            @Override
                            public int minProperties() {
                                return schema.minProperties();
                            }

                            @Override
                            public String[] requiredProperties() {
                                return schema.requiredProperties();
                            }

                            @Override
                            public boolean required() {
                                return schema.required();
                            }

                            @Override
                            public String description() {
                                return schema.description();
                            }

                            @Override
                            public String format() {
                                return schema.format();
                            }

                            @Override
                            public String ref() {
                                return schema.ref();
                            }

                            @Override
                            public boolean nullable() {
                                return schema.nullable();
                            }

                            @Override
                            public boolean readOnly() {
                                return AccessMode.READ_ONLY.equals(schema.accessMode());
                            }

                            @Override
                            public boolean writeOnly() {
                                return AccessMode.WRITE_ONLY.equals(schema.accessMode());
                            }

                            @Override
                            public AccessMode accessMode() {
                                return schema.accessMode();
                            }

                            @Override
                            public String example() {
                                return schema.example();
                            }

                            @Override
                            public ExternalDocumentation externalDocs() {
                                return schema.externalDocs();
                            }

                            @Override
                            public boolean deprecated() {
                                return schema.deprecated();
                            }

                            @Override
                            public String type() {
                                return schema.type();
                            }

                            @Override
                            public String[] allowableValues() {
                                return schema.allowableValues();
                            }

                            @Override
                            public String defaultValue() {
                                return getArrayDefaultValue(parameterName, pageableDefault, schema.defaultValue());
                            }

                            @Override
                            public String discriminatorProperty() {
                                return schema.discriminatorProperty();
                            }

                            @Override
                            public DiscriminatorMapping[] discriminatorMapping() {
                                return schema.discriminatorMapping();
                            }

                            @Override
                            public boolean hidden() {
                                return schema.hidden();
                            }

                            @Override
                            public boolean enumAsRef() {
                                return schema.enumAsRef();
                            }

                            @Override
                            public Class<?>[] subTypes() {
                                return schema.subTypes();
                            }

                            @Override
                            public Extension[] extensions() {
                                return schema.extensions();
                            }

                            @Override
                            public AdditionalPropertiesValue additionalProperties() {
                                return schema.additionalProperties();
                            }
                        };
                    }

                    @Override
                    public int maxItems() {
                        return arraySchema.maxItems();
                    }

                    @Override
                    public int minItems() {
                        return arraySchema.minItems();
                    }

                    @Override
                    public boolean uniqueItems() {
                        return arraySchema.uniqueItems();
                    }

                    @Override
                    public Extension[] extensions() {
                        return arraySchema.extensions();
                    }
                };
            }

            @Override
            public Content[] content() {
                return parameter.content();
            }

            @Override
            public boolean hidden() {
                return parameter.hidden();
            }

            @Override
            public ExampleObject[] examples() {
                return parameter.examples();
            }

            @Override
            public String example() {
                return parameter.example();
            }

            @Override
            public Extension[] extensions() {
                return parameter.extensions();
            }

            @Override
            public String ref() {
                return parameter.ref();
            }
        };
        return Optional.of(parameterNew);
    } catch (NoSuchFieldException e) {
        LOGGER.warn(e.getMessage());
        return Optional.empty();
    }
}
Also used : ParameterStyle(io.swagger.v3.oas.annotations.enums.ParameterStyle) ParameterIn(io.swagger.v3.oas.annotations.enums.ParameterIn) Schema(io.swagger.v3.oas.annotations.media.Schema) ArraySchema(io.swagger.v3.oas.annotations.media.ArraySchema) Annotation(java.lang.annotation.Annotation) Field(java.lang.reflect.Field) Explode(io.swagger.v3.oas.annotations.enums.Explode) ExternalDocumentation(io.swagger.v3.oas.annotations.ExternalDocumentation) ArraySchema(io.swagger.v3.oas.annotations.media.ArraySchema) DelegatingMethodParameter(org.springdoc.core.DelegatingMethodParameter) MethodParameter(org.springframework.core.MethodParameter) Parameter(io.swagger.v3.oas.annotations.Parameter)

Aggregations

Parameter (io.swagger.v3.oas.models.parameters.Parameter)7 Operation (io.swagger.v3.oas.models.Operation)5 Schema (io.swagger.v3.oas.models.media.Schema)5 RequestParameter (io.vertx.ext.web.api.RequestParameter)4 RequestParameters (io.vertx.ext.web.api.RequestParameters)4 OpenAPI3RequestValidationHandlerImpl (io.vertx.ext.web.api.contract.openapi3.impl.OpenAPI3RequestValidationHandlerImpl)4 ArrayList (java.util.ArrayList)4 Test (org.junit.Test)4 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)3 ArraySchema (io.swagger.v3.oas.models.media.ArraySchema)3 Map (java.util.Map)3 Optional (java.util.Optional)3 Collectors (java.util.stream.Collectors)3 JsonNode (com.fasterxml.jackson.databind.JsonNode)2 NullNode (com.fasterxml.jackson.databind.node.NullNode)2 ImmutableList (com.google.common.collect.ImmutableList)2 ImmutableMap (com.google.common.collect.ImmutableMap)2 Content (io.swagger.v3.oas.models.media.Content)2 Encoding (io.swagger.v3.oas.models.media.Encoding)2 ObjectSchema (io.swagger.v3.oas.models.media.ObjectSchema)2