├── .github ├── dependabot.yml ├── topissuebot.yml └── workflows │ ├── codeql-analysis.yml │ ├── dependency-review.yml │ ├── maven-pulls.yml │ ├── maven-v1-pulls.yml │ ├── maven-v1.yml │ ├── maven.yml │ ├── prepare-release.yml │ └── release.yml ├── .gitignore ├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── .whitesource ├── CI ├── CI.md ├── ghApiClient.py ├── lastRelease.py ├── post-release.sh ├── pre-release.sh ├── prepare-javadocs.sh ├── prepare-release.sh ├── publish-javadocs.sh ├── publishRelease.py ├── releaseNotes.py ├── test.py ├── update-v1-readme.sh └── update-wiki.sh ├── LICENSE ├── NOTICE ├── README.md ├── modules ├── swagger-annotations │ ├── .gitignore │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── swagger │ │ └── v3 │ │ └── oas │ │ └── annotations │ │ ├── ExternalDocumentation.java │ │ ├── Hidden.java │ │ ├── OpenAPI31.java │ │ ├── OpenAPIDefinition.java │ │ ├── Operation.java │ │ ├── Parameter.java │ │ ├── Parameters.java │ │ ├── StringToClassMapItem.java │ │ ├── Webhook.java │ │ ├── Webhooks.java │ │ ├── callbacks │ │ ├── Callback.java │ │ └── Callbacks.java │ │ ├── enums │ │ ├── Explode.java │ │ ├── ParameterIn.java │ │ ├── ParameterStyle.java │ │ ├── SecuritySchemeIn.java │ │ └── SecuritySchemeType.java │ │ ├── extensions │ │ ├── Extension.java │ │ ├── ExtensionProperty.java │ │ └── Extensions.java │ │ ├── headers │ │ └── Header.java │ │ ├── info │ │ ├── Contact.java │ │ ├── Info.java │ │ └── License.java │ │ ├── links │ │ ├── Link.java │ │ └── LinkParameter.java │ │ ├── media │ │ ├── ArraySchema.java │ │ ├── Content.java │ │ ├── DependentRequired.java │ │ ├── DependentRequiredMap.java │ │ ├── DependentSchema.java │ │ ├── DependentSchemas.java │ │ ├── DiscriminatorMapping.java │ │ ├── Encoding.java │ │ ├── ExampleObject.java │ │ ├── PatternProperties.java │ │ ├── PatternProperty.java │ │ ├── Schema.java │ │ ├── SchemaProperties.java │ │ └── SchemaProperty.java │ │ ├── parameters │ │ ├── RequestBody.java │ │ └── ValidatedParameter.java │ │ ├── responses │ │ ├── ApiResponse.java │ │ └── ApiResponses.java │ │ ├── security │ │ ├── OAuthFlow.java │ │ ├── OAuthFlows.java │ │ ├── OAuthScope.java │ │ ├── SecurityRequirement.java │ │ ├── SecurityRequirements.java │ │ ├── SecurityScheme.java │ │ └── SecuritySchemes.java │ │ ├── servers │ │ ├── Server.java │ │ ├── ServerVariable.java │ │ └── Servers.java │ │ └── tags │ │ ├── Tag.java │ │ └── Tags.java ├── swagger-core │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── core │ │ │ ├── converter │ │ │ ├── AnnotatedType.java │ │ │ ├── ModelConverter.java │ │ │ ├── ModelConverterContext.java │ │ │ ├── ModelConverterContextImpl.java │ │ │ ├── ModelConverters.java │ │ │ └── ResolvedSchema.java │ │ │ ├── filter │ │ │ ├── AbstractSpecFilter.java │ │ │ ├── OpenAPI31SpecFilter.java │ │ │ ├── OpenAPISpecFilter.java │ │ │ └── SpecFilter.java │ │ │ ├── jackson │ │ │ ├── AbstractModelConverter.java │ │ │ ├── ApiResponsesSerializer.java │ │ │ ├── CallbackSerializer.java │ │ │ ├── ExampleSerializer.java │ │ │ ├── JAXBAnnotationsHelper.java │ │ │ ├── MediaTypeSerializer.java │ │ │ ├── ModelResolver.java │ │ │ ├── PackageVersion.java │ │ │ ├── PathsSerializer.java │ │ │ ├── Schema31Serializer.java │ │ │ ├── SchemaSerializer.java │ │ │ ├── SwaggerAnnotationIntrospector.java │ │ │ ├── SwaggerModule.java │ │ │ ├── TypeNameResolver.java │ │ │ └── mixin │ │ │ │ ├── Components31Mixin.java │ │ │ │ ├── ComponentsMixin.java │ │ │ │ ├── DateSchemaMixin.java │ │ │ │ ├── Discriminator31Mixin.java │ │ │ │ ├── DiscriminatorMixin.java │ │ │ │ ├── ExampleMixin.java │ │ │ │ ├── ExtensionsMixin.java │ │ │ │ ├── Info31Mixin.java │ │ │ │ ├── InfoMixin.java │ │ │ │ ├── LicenseMixin.java │ │ │ │ ├── MediaTypeMixin.java │ │ │ │ ├── OpenAPI31Mixin.java │ │ │ │ ├── OpenAPIMixin.java │ │ │ │ ├── OperationMixin.java │ │ │ │ ├── Schema31Mixin.java │ │ │ │ ├── SchemaConverterMixin.java │ │ │ │ └── SchemaMixin.java │ │ │ ├── model │ │ │ └── ApiDescription.java │ │ │ └── util │ │ │ ├── AnnotationsUtils.java │ │ │ ├── ApiResponses31Deserializer.java │ │ │ ├── ApiResponsesDeserializer.java │ │ │ ├── Callback31Deserializer.java │ │ │ ├── CallbackDeserializer.java │ │ │ ├── Configuration.java │ │ │ ├── Constants.java │ │ │ ├── DeserializationModule.java │ │ │ ├── DeserializationModule31.java │ │ │ ├── EncodingPropertyStyleEnumDeserializer.java │ │ │ ├── EncodingStyleEnumDeserializer.java │ │ │ ├── HeaderStyleEnumDeserializer.java │ │ │ ├── Json.java │ │ │ ├── Json31.java │ │ │ ├── KotlinDetector.java │ │ │ ├── Model31Deserializer.java │ │ │ ├── ModelDeserializer.java │ │ │ ├── ObjectMapperFactory.java │ │ │ ├── OpenAPI30To31.java │ │ │ ├── OpenAPI31Deserializer.java │ │ │ ├── OpenAPISchema2JsonSchema.java │ │ │ ├── Parameter31Deserializer.java │ │ │ ├── ParameterDeserializer.java │ │ │ ├── ParameterProcessor.java │ │ │ ├── PathUtils.java │ │ │ ├── Paths31Deserializer.java │ │ │ ├── PathsDeserializer.java │ │ │ ├── PrimitiveType.java │ │ │ ├── RefUtils.java │ │ │ ├── ReferenceTypeUtils.java │ │ │ ├── ReflectionUtils.java │ │ │ ├── SecurityScheme31Deserializer.java │ │ │ ├── SecuritySchemeDeserializer.java │ │ │ ├── ValidatorProcessor.java │ │ │ ├── Yaml.java │ │ │ └── Yaml31.java │ │ └── test │ │ ├── java │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── core │ │ │ ├── converting │ │ │ ├── ByteConverterTest.java │ │ │ ├── CompositionTest.java │ │ │ ├── CovariantGetterTest.java │ │ │ ├── EnumPropertyTest.java │ │ │ ├── GuavaTest.java │ │ │ ├── ModelConverterTest.java │ │ │ ├── ModelPropertyTest.java │ │ │ ├── NumericFormatTest.java │ │ │ ├── PojoTest.java │ │ │ ├── SwaggerSerializerTest.java │ │ │ └── override │ │ │ │ ├── CustomAnnotationConverter.java │ │ │ │ ├── CustomConverterTest.java │ │ │ │ ├── CustomResolverTest.java │ │ │ │ ├── GericModelConverter.java │ │ │ │ ├── ModelPropertyOverrideTest.java │ │ │ │ ├── OverrideTest.java │ │ │ │ ├── SamplePropertyConverter.java │ │ │ │ ├── SamplePropertyExtendedConverter.java │ │ │ │ ├── SnakeCaseConverterTest.java │ │ │ │ └── resources │ │ │ │ ├── GenericModel.java │ │ │ │ └── MyCustomClass.java │ │ │ ├── deserialization │ │ │ ├── ComprehensiveOAS31ValidationTest.java │ │ │ ├── JsonDeserializationTest.java │ │ │ ├── ObjectPropertyTest.java │ │ │ ├── OpenAPI3_1DeserializationTest.java │ │ │ ├── ParameterDeSerializationTest.java │ │ │ ├── SchemaDeserializationTest.java │ │ │ └── properties │ │ │ │ ├── ArrayPropertyDeserializerTest.java │ │ │ │ ├── JsonPropertiesDeserializationTest.java │ │ │ │ ├── MapPropertyDeserializerTest.java │ │ │ │ └── PropertyDeserializerTest.java │ │ │ ├── filter │ │ │ ├── SpecFilterTest.java │ │ │ └── resources │ │ │ │ ├── ChangeGetOperationsFilter.java │ │ │ │ ├── InternalModelPropertiesRemoverFilter.java │ │ │ │ ├── NoCategoryRefSchemaFilter.java │ │ │ │ ├── NoGetOperationsFilter.java │ │ │ │ ├── NoOpOperationsFilter.java │ │ │ │ ├── NoOpenAPIFilter.java │ │ │ │ ├── NoParametersWithoutQueryInFilter.java │ │ │ │ ├── NoPathItemFilter.java │ │ │ │ ├── NoPetOperationsFilter.java │ │ │ │ ├── NoPetRefSchemaFilter.java │ │ │ │ ├── NoTagRefSchemaPropertyFilter.java │ │ │ │ ├── RemoveInternalParamsFilter.java │ │ │ │ ├── RemoveUnreferencedDefinitionsFilter.java │ │ │ │ └── ReplaceGetOperationsFilter.java │ │ │ ├── matchers │ │ │ └── SerializationMatchers.java │ │ │ ├── oas │ │ │ └── models │ │ │ │ ├── Address.java │ │ │ │ ├── ApiFirstRequiredFieldModel.java │ │ │ │ ├── BeanValidationsModel.java │ │ │ │ ├── Car.java │ │ │ │ ├── Cat.java │ │ │ │ ├── Children.java │ │ │ │ ├── ClientOptInput.java │ │ │ │ ├── Department.java │ │ │ │ ├── Employee.java │ │ │ │ ├── EmptyModel.java │ │ │ │ ├── Error.java │ │ │ │ ├── GuavaModel.java │ │ │ │ ├── Issue534.java │ │ │ │ ├── JCovariantGetter.java │ │ │ │ ├── JacksonIntegerValueEnum.java │ │ │ │ ├── JacksonIntegerValueFieldEnum.java │ │ │ │ ├── JacksonPropertyEnum.java │ │ │ │ ├── JacksonReadonlyModel.java │ │ │ │ ├── JacksonValueEnum.java │ │ │ │ ├── JacksonValueFieldEnum.java │ │ │ │ ├── JacksonValuePrivateEnum.java │ │ │ │ ├── JodaDateTimeModel.java │ │ │ │ ├── Link.java │ │ │ │ ├── Manufacturers.java │ │ │ │ ├── Model1155.java │ │ │ │ ├── Model1979.java │ │ │ │ ├── ModelExampleTest.java │ │ │ │ ├── ModelPropertyName.java │ │ │ │ ├── ModelWithAltPropertyName.java │ │ │ │ ├── ModelWithApiModel.java │ │ │ │ ├── ModelWithBooleanProperty.java │ │ │ │ ├── ModelWithEnumArray.java │ │ │ │ ├── ModelWithEnumField.java │ │ │ │ ├── ModelWithEnumProperty.java │ │ │ │ ├── ModelWithEnumRefProperty.java │ │ │ │ ├── ModelWithFormattedStrings.java │ │ │ │ ├── ModelWithJAXBAnnotations.java │ │ │ │ ├── ModelWithJacksonEnumField.java │ │ │ │ ├── ModelWithJaxBDefaultValues.java │ │ │ │ ├── ModelWithModelPropertyOverrides.java │ │ │ │ ├── ModelWithNumbers.java │ │ │ │ ├── ModelWithOffset.java │ │ │ │ ├── ModelWithPrimitiveArray.java │ │ │ │ ├── ModelWithRanges.java │ │ │ │ ├── ModelWithTuple2.java │ │ │ │ ├── Person.java │ │ │ │ ├── ReadOnlyFields.java │ │ │ │ ├── ReadOnlyModel.java │ │ │ │ ├── RequiredFields.java │ │ │ │ ├── RequiredRefFieldModel.java │ │ │ │ ├── SpecialOrderItem.java │ │ │ │ ├── TestEnum.java │ │ │ │ ├── TestSecondEnum.java │ │ │ │ ├── XmlFirstRequiredFieldModel.java │ │ │ │ ├── composition │ │ │ │ ├── AbstractBaseModelWithSubTypes.java │ │ │ │ ├── AbstractBaseModelWithoutFields.java │ │ │ │ ├── AbstractModelWithApiModel.java │ │ │ │ ├── Animal.java │ │ │ │ ├── AnimalClass.java │ │ │ │ ├── AnimalWithSchemaSubtypes.java │ │ │ │ ├── Human.java │ │ │ │ ├── HumanClass.java │ │ │ │ ├── HumanWithSchemaSubtypes.java │ │ │ │ ├── ModelWithFieldWithSubTypes.java │ │ │ │ ├── ModelWithUrlProperty.java │ │ │ │ ├── ModelWithValueProperty.java │ │ │ │ ├── Pet.java │ │ │ │ ├── PetClass.java │ │ │ │ ├── PetWithSchemaSubtypes.java │ │ │ │ ├── Thing1.java │ │ │ │ ├── Thing2.java │ │ │ │ └── Thing3.java │ │ │ │ └── xmltest │ │ │ │ ├── NestedModelWithJAXBAnnotations.java │ │ │ │ ├── SubModelWithJAXBAnnotations.java │ │ │ │ └── package-info.java │ │ │ ├── resolving │ │ │ ├── ATMTest.java │ │ │ ├── AllofResolvingTest.java │ │ │ ├── AnnotationsUtilsExtensionsTest.java │ │ │ ├── AnnotationsUtilsHeadersTest.java │ │ │ ├── BeanValidatorTest.java │ │ │ ├── ComplexPropertyTest.java │ │ │ ├── ComposedSchemaTest.java │ │ │ ├── ContainerTest.java │ │ │ ├── EnumTest.java │ │ │ ├── HiddenFieldTest.java │ │ │ ├── InheritedBeanTest.java │ │ │ ├── InlineResolvingTest.java │ │ │ ├── JacksonJsonUnwrappedTest.java │ │ │ ├── JaxBDefaultValueTest.java │ │ │ ├── JodaDateTimeConverterTest.java │ │ │ ├── JodaLocalDateConverterTest.java │ │ │ ├── JodaTest.java │ │ │ ├── JsonPropertyTest.java │ │ │ ├── JsonViewTest.java │ │ │ ├── ModelWithRangesTest.java │ │ │ ├── RequiredFieldModelTest.java │ │ │ ├── SimpleGenerationTest.java │ │ │ ├── SwaggerTestBase.java │ │ │ ├── Ticket2189Test.java │ │ │ ├── Ticket2740CyclicTest.java │ │ │ ├── Ticket2862SubtypeTest.java │ │ │ ├── Ticket2884Test.java │ │ │ ├── Ticket2915Test.java │ │ │ ├── Ticket2926Test.java │ │ │ ├── Ticket2972Test.java │ │ │ ├── Ticket2992Test.java │ │ │ ├── Ticket3030Test.java │ │ │ ├── Ticket3063Test.java │ │ │ ├── Ticket3197Test.java │ │ │ ├── Ticket3348Test.java │ │ │ ├── Ticket3365Test.java │ │ │ ├── Ticket3624Test.java │ │ │ ├── Ticket3697Test.java │ │ │ ├── Ticket3699Test.java │ │ │ ├── Ticket3703Test.java │ │ │ ├── Ticket3853Test.java │ │ │ ├── Ticket3904Test.java │ │ │ ├── Ticket4239Test.java │ │ │ ├── Ticket4290Test.java │ │ │ ├── Ticket4362Test.java │ │ │ ├── Ticket4474Test.java │ │ │ ├── Ticket4679Test.java │ │ │ ├── Ticket4760Test.java │ │ │ ├── Ticket4771Test.java │ │ │ ├── XMLGregorianCalendarTest.java │ │ │ ├── XMLInfoTest.java │ │ │ ├── XmlModelTest.java │ │ │ ├── resources │ │ │ │ ├── BidimensionalArray.java │ │ │ │ ├── InnerType.java │ │ │ │ ├── InnerTypeRequired.java │ │ │ │ ├── Issue4290.java │ │ │ │ ├── JacksonUnwrappedRequiredProperty.java │ │ │ │ ├── JsonViewObject.java │ │ │ │ ├── MyThing.java │ │ │ │ ├── TestArrayType.java │ │ │ │ ├── TestObject2616.java │ │ │ │ ├── TestObject2915.java │ │ │ │ ├── TestObject2972.java │ │ │ │ ├── TestObject2992.java │ │ │ │ ├── TestObject3697.java │ │ │ │ ├── TestObject3699.java │ │ │ │ ├── TestObject4715.java │ │ │ │ ├── TestObjectTicket2620.java │ │ │ │ ├── TestObjectTicket2620Subtypes.java │ │ │ │ ├── TestObjectTicket2900.java │ │ │ │ ├── TestObjectTicket4247.java │ │ │ │ ├── Ticket2862Model.java │ │ │ │ ├── Ticket2862ModelImpl.java │ │ │ │ ├── Ticket2884Model.java │ │ │ │ ├── Ticket2884ModelClass.java │ │ │ │ └── User2169.java │ │ │ └── v31 │ │ │ │ ├── ModelResolverOAS31Test.java │ │ │ │ ├── PatternAndSchemaPropertiesTest.java │ │ │ │ ├── Ticket3900Test.java │ │ │ │ └── model │ │ │ │ ├── Address.java │ │ │ │ ├── AnnotatedArray.java │ │ │ │ ├── AnnotatedPet.java │ │ │ │ ├── AnnotatedPetSinglePatternProperty.java │ │ │ │ ├── Category.java │ │ │ │ ├── Client.java │ │ │ │ ├── CreditCard.java │ │ │ │ ├── CustomGenerator.java │ │ │ │ ├── ExtensionUser.java │ │ │ │ ├── JacksonBean.java │ │ │ │ ├── ListOfStringsBeanParam.java │ │ │ │ ├── ModelWithDependentSchema.java │ │ │ │ ├── ModelWithJsonIdentity.java │ │ │ │ ├── ModelWithJsonIdentityCyclic.java │ │ │ │ ├── ModelWithOAS31Stuff.java │ │ │ │ ├── ModelWithOAS31StuffMinimal.java │ │ │ │ ├── MultipleBaseBean.java │ │ │ │ ├── MultipleSub1Bean.java │ │ │ │ ├── MultipleSub2Bean.java │ │ │ │ ├── NotFoundModel.java │ │ │ │ ├── Pet.java │ │ │ │ ├── PostalCodeNumberPattern.java │ │ │ │ ├── PostalCodePattern.java │ │ │ │ ├── Tag.java │ │ │ │ ├── User.java │ │ │ │ └── siblings │ │ │ │ ├── Category.java │ │ │ │ └── Pet.java │ │ │ ├── roundtrip │ │ │ └── ComprehensiveRoundTripTest.java │ │ │ ├── serialization │ │ │ ├── ComprehensiveSerializationTest.java │ │ │ ├── JsonSerializationTest.java │ │ │ ├── ModelSerializerTest.java │ │ │ ├── OpenAPI3_1SerializationTest.java │ │ │ ├── ParameterSerializationTest.java │ │ │ ├── ResponseExamplesTest.java │ │ │ ├── SchemaSerializationTest.java │ │ │ ├── SecurityDefinitionTest.java │ │ │ ├── YamlSerializerTest.java │ │ │ ├── auth │ │ │ │ └── AuthSerializationTest.java_ │ │ │ └── properties │ │ │ │ └── PropertySerializationTest.java │ │ │ └── util │ │ │ ├── AnnotationsUtilsTest.java │ │ │ ├── OutputReplacer.java │ │ │ ├── PathUtilsTest.java │ │ │ ├── ReferenceTypeUtilsTest.java │ │ │ ├── ResourceUtils.java │ │ │ ├── TestUtils.java │ │ │ └── reflection │ │ │ ├── ReflectionUtilsTest.java │ │ │ └── resources │ │ │ ├── Child.java │ │ │ ├── IGrandparent.java │ │ │ ├── IParent.java │ │ │ ├── IndirectAnnotation.java │ │ │ ├── ObjectWithManyFields.java │ │ │ └── Parent.java │ │ └── resources │ │ ├── AbstractBaseModelWithoutFields.json │ │ ├── Animal.json │ │ ├── AnimalClass.json │ │ ├── AnimalWithSchemaSubtypes.json │ │ ├── Cat.json │ │ ├── GuavaTestModel.json │ │ ├── Human.json │ │ ├── JodaDateTimeModel.json │ │ ├── ModelWithFieldWithSubTypes.json │ │ ├── ModelWithFormattedStrings.json │ │ ├── ModelWithSecurityRequirements.json │ │ ├── Person.json │ │ ├── Pet.json │ │ ├── comprehensiveOAS31 │ │ ├── comprehensive-openapi.yaml │ │ ├── paths │ │ │ ├── order-paths.yaml │ │ │ ├── pet-paths.yaml │ │ │ └── user-paths.yaml │ │ └── schemas │ │ │ ├── common-schemas.yaml │ │ │ ├── json-schema.yaml │ │ │ ├── order-schemas.yaml │ │ │ ├── pet-schemas.yaml │ │ │ └── user-schemas.yaml │ │ ├── dateSchema.yaml │ │ ├── json-schema-validation │ │ ├── array.json │ │ └── map.json │ │ ├── logback-test.xml │ │ ├── specFiles │ │ ├── 3.1.0 │ │ │ ├── changelog-3.1.yaml │ │ │ ├── composed-schema-3.1.json │ │ │ ├── issue-4737-3.1.yaml │ │ │ ├── list-3.1.json │ │ │ ├── petstore-3.1.json │ │ │ ├── petstore-3.1.yaml │ │ │ ├── petstore-3.1_more.yaml │ │ │ ├── petstore-3.1_refs_siblings.yaml │ │ │ ├── petstore-3.1_sample.yaml │ │ │ ├── specWithDynamicRef.yaml │ │ │ └── specWithReferredSchemas-3.1.yaml │ │ ├── additionalpropsmodel.json │ │ ├── brokenrefmodel.json │ │ ├── compositionTest-3.0.json │ │ ├── compositionTest.json │ │ ├── deprecatedoperationmodel.json │ │ ├── jsonSerialization-expected-petstore-3.0.json │ │ ├── media-type-null-example.yaml │ │ ├── noModels.json │ │ ├── null-example.yaml │ │ ├── null-in-schema-example.yaml │ │ ├── oas3.yaml │ │ ├── oas3_2.yaml │ │ ├── paramAndResponseRef.json │ │ ├── paramAndResponseRefArray.json │ │ ├── paramAndResponseRefComposed.json │ │ ├── pathRef.json │ │ ├── petstore-3.0-referred-schemas.json │ │ ├── petstore-3.0-v2-ticket-3303.json │ │ ├── petstore-3.0-v2.json │ │ ├── petstore-3.0-v2_withoutModels.json │ │ ├── petstore-3.0.json │ │ ├── petstore-3.0.yaml │ │ ├── petstore.json │ │ ├── propertiesWithConstraints.json │ │ ├── propertyWithVendorExtensions.json │ │ ├── recursivemodels.json │ │ ├── responseRef.json │ │ ├── sampleSpec.json │ │ ├── securityDefinitions.json │ │ ├── securitySchemaWithExtension.json │ │ └── swos-126.yaml │ │ ├── testOAS31 │ │ └── basicOAS31.yaml │ │ └── uber.json ├── swagger-eclipse-transformer-maven-plugin │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── swagger │ │ └── v3 │ │ └── oas │ │ └── transformer │ │ └── TransformMojo.java ├── swagger-gradle-plugin │ ├── .gitignore │ ├── README.md │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── settings.gradle │ └── src │ │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── plugins │ │ │ └── gradle │ │ │ ├── SwaggerPlugin.java │ │ │ └── tasks │ │ │ └── ResolveTask.java │ │ └── test │ │ └── java │ │ └── io │ │ └── swagger │ │ └── v3 │ │ └── plugins │ │ └── gradle │ │ ├── SwaggerResolveTest.java │ │ ├── petstore │ │ ├── EmptyPetResource.java │ │ ├── PetResource.java │ │ ├── callback │ │ │ ├── ComplexCallbackResource.java │ │ │ ├── MultipleCallbacksTestWithOperationResource.java │ │ │ ├── RepeatableCallbackResource.java │ │ │ └── SimpleCallbackWithOperationResource.java │ │ ├── example │ │ │ ├── ExamplesResource.java │ │ │ └── SubscriptionResponse.java │ │ ├── link │ │ │ └── LinksResource.java │ │ ├── openapidefintion │ │ │ └── OpenAPIDefinitionResource.java │ │ ├── operation │ │ │ ├── AnnotatedSameNameOperationResource.java │ │ │ ├── ExternalDocumentationResource.java │ │ │ ├── FullyAnnotatedOperationResource.java │ │ │ ├── HiddenOperationResource.java │ │ │ ├── InterfaceResource.java │ │ │ ├── NotAnnotatedSameNameOperationResource.java │ │ │ ├── OperationResource.java │ │ │ ├── OperationWithoutAnnotationResource.java │ │ │ ├── ServerOperationResource.java │ │ │ └── SubResource.java │ │ ├── parameter │ │ │ ├── ArraySchemaResource.java │ │ │ ├── ComplexParameterResource.java │ │ │ ├── ComplexParameterWithOperationResource.java │ │ │ ├── MultipleNotAnnotatedParameter.java │ │ │ ├── OpenAPIJaxRSAnnotatedParameter.java │ │ │ ├── OpenAPIWithContentJaxRSAnnotatedParameter.java │ │ │ ├── OpenAPIWithImplementationJaxRSAnnotatedParameter.java │ │ │ ├── ParametersResource.java │ │ │ ├── RepeatableParametersResource.java │ │ │ ├── SingleJaxRSAnnotatedParameter.java │ │ │ └── SingleNotAnnotatedParameter.java │ │ ├── requestbody │ │ │ ├── RequestBodyMethodPriorityResource.java │ │ │ ├── RequestBodyParameterPriorityResource.java │ │ │ └── RequestBodyResource.java │ │ ├── responses │ │ │ ├── ComplexResponseResource.java │ │ │ ├── ImplementationResponseResource.java │ │ │ ├── MethodResponseResource.java │ │ │ ├── NoImplementationResponseResource.java │ │ │ ├── NoResponseResource.java │ │ │ ├── OperationResponseResource.java │ │ │ └── PriorityResponseResource.java │ │ ├── security │ │ │ └── SecurityResource.java │ │ └── tags │ │ │ ├── CompleteTagResource.java │ │ │ ├── TagClassResource.java │ │ │ ├── TagMethodResource.java │ │ │ ├── TagOpenAPIDefinitionResource.java │ │ │ └── TagOperationResource.java │ │ └── resources │ │ ├── MyFilter.java │ │ ├── QueryResultBean.java │ │ ├── data │ │ ├── PetData.java │ │ └── UserData.java │ │ ├── exception │ │ ├── ApiException.java │ │ └── NotFoundException.java │ │ └── model │ │ ├── Category.java │ │ ├── CustomGenerator.java │ │ ├── ExtensionUser.java │ │ ├── JacksonBean.java │ │ ├── ListOfStringsBeanParam.java │ │ ├── ModelWithJsonIdentity.java │ │ ├── ModelWithJsonIdentityCyclic.java │ │ ├── MultipleBaseBean.java │ │ ├── MultipleSub1Bean.java │ │ ├── MultipleSub2Bean.java │ │ ├── NotFoundModel.java │ │ ├── Pet.java │ │ ├── Tag.java │ │ └── User.java ├── swagger-integration │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── oas │ │ │ └── integration │ │ │ ├── ClasspathOpenApiConfigurationLoader.java │ │ │ ├── ContextUtils.java │ │ │ ├── FileOpenApiConfigurationLoader.java │ │ │ ├── GenericOpenApiContext.java │ │ │ ├── GenericOpenApiContextBuilder.java │ │ │ ├── GenericOpenApiScanner.java │ │ │ ├── IgnoredPackages.java │ │ │ ├── IntegrationObjectMapperFactory.java │ │ │ ├── OpenApiConfigurationException.java │ │ │ ├── OpenApiContextLocator.java │ │ │ ├── ServiceOpenApiConfigurationLoader.java │ │ │ ├── StringOpenApiConfigurationLoader.java │ │ │ ├── SwaggerConfiguration.java │ │ │ ├── URLOpenApiConfigurationLoader.java │ │ │ └── api │ │ │ ├── ObjectMapperProcessor.java │ │ │ ├── OpenAPIConfigBuilder.java │ │ │ ├── OpenAPIConfiguration.java │ │ │ ├── OpenApiConfigurationLoader.java │ │ │ ├── OpenApiContext.java │ │ │ ├── OpenApiContextBuilder.java │ │ │ ├── OpenApiReader.java │ │ │ └── OpenApiScanner.java │ │ └── test │ │ └── java │ │ └── io │ │ └── swagger │ │ └── v3 │ │ └── oas │ │ └── integration │ │ └── IntegrationTest.java ├── swagger-java17-support │ ├── pom.xml │ └── src │ │ └── test │ │ └── java │ │ └── io │ │ └── swagger │ │ └── v3 │ │ └── java17 │ │ ├── Reader │ │ ├── ReaderTest.java │ │ └── SchemaResolutionRecordsTest.java │ │ ├── matchers │ │ └── SerializationMatchers.java │ │ ├── resolving │ │ ├── JavaRecordTest.java │ │ ├── SwaggerTestBase.java │ │ └── v31 │ │ │ └── ModelResolverOAS31Test.java │ │ └── resources │ │ ├── JavaRecordResource.java │ │ ├── JavaRecordWithPathResource.java │ │ ├── OtherJavaRecordWithPathsResource.java │ │ ├── SchemaResolutionWithRecordSimpleResource.java │ │ ├── SchemaResolutionWithRecordsResource.java │ │ └── TestControllerWithRecordResource.java ├── swagger-jaxrs2-servlet-initializer-v2 │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── jaxrs2 │ │ │ └── integration │ │ │ └── servlet │ │ │ └── SwaggerServletInitializer.java │ │ └── resources │ │ └── META-INF │ │ └── services │ │ └── javax.servlet.ServletContainerInitializer ├── swagger-jaxrs2-servlet-initializer │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── jaxrs2 │ │ │ └── integration │ │ │ └── SwaggerServletInitializer.java │ │ └── resources │ │ └── META-INF │ │ └── services │ │ └── javax.servlet.ServletContainerInitializer ├── swagger-jaxrs2 │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── io │ │ │ │ └── swagger │ │ │ │ └── v3 │ │ │ │ └── jaxrs2 │ │ │ │ ├── DefaultParameterExtension.java │ │ │ │ ├── OperationParser.java │ │ │ │ ├── Reader.java │ │ │ │ ├── ReaderListener.java │ │ │ │ ├── ResolvedParameter.java │ │ │ │ ├── SecurityParser.java │ │ │ │ ├── SwaggerSerializers.java │ │ │ │ ├── ext │ │ │ │ ├── AbstractOpenAPIExtension.java │ │ │ │ ├── OpenAPIExtension.java │ │ │ │ └── OpenAPIExtensions.java │ │ │ │ ├── integration │ │ │ │ ├── JaxrsAnnotationScanner.java │ │ │ │ ├── JaxrsApplicationAndAnnotationScanner.java │ │ │ │ ├── JaxrsApplicationAndResourcePackagesAnnotationScanner.java │ │ │ │ ├── JaxrsApplicationScanner.java │ │ │ │ ├── JaxrsOpenApiContext.java │ │ │ │ ├── JaxrsOpenApiContextBuilder.java │ │ │ │ ├── OpenApiServlet.java │ │ │ │ ├── ServletConfigContextUtils.java │ │ │ │ ├── ServletOpenApiConfigurationLoader.java │ │ │ │ ├── ServletOpenApiContextBuilder.java │ │ │ │ ├── ServletPathConfigurationLoader.java │ │ │ │ ├── SwaggerLoader.java │ │ │ │ ├── XmlWebOpenApiContext.java │ │ │ │ ├── api │ │ │ │ │ ├── JaxrsOpenApiScanner.java │ │ │ │ │ └── WebOpenApiContext.java │ │ │ │ └── resources │ │ │ │ │ ├── AcceptHeaderOpenApiResource.java │ │ │ │ │ ├── BaseOpenApiResource.java │ │ │ │ │ └── OpenApiResource.java │ │ │ │ └── util │ │ │ │ ├── ReaderUtils.java │ │ │ │ └── ServletUtils.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── beans.xml │ │ └── test │ │ ├── java │ │ ├── com │ │ │ └── my │ │ │ │ ├── project │ │ │ │ └── resources │ │ │ │ │ └── ResourceInPackageA.java │ │ │ │ └── sorted │ │ │ │ └── resources │ │ │ │ └── SortedThing.java │ │ ├── io │ │ │ └── swagger │ │ │ │ └── v3 │ │ │ │ └── jaxrs2 │ │ │ │ ├── BeanParamTest.java │ │ │ │ ├── BinaryParameterResourceTest.java │ │ │ │ ├── BootstrapServlet.java │ │ │ │ ├── ContainerTypeSchemaTicket2636Test.java │ │ │ │ ├── DecoratorExtensionTest.java │ │ │ │ ├── EnumTest.java │ │ │ │ ├── FormParamBeanTest.java │ │ │ │ ├── JaxbObjectMapperFactory.java │ │ │ │ ├── JsonIdentityTest.java │ │ │ │ ├── JsonViewTest.java │ │ │ │ ├── PetResourceTest.java │ │ │ │ ├── ReaderTest.java │ │ │ │ ├── SchemaResolutionAllOfRefTest.java │ │ │ │ ├── SchemaResolutionAllOfTest.java │ │ │ │ ├── SchemaResolutionAnnotationTest.java │ │ │ │ ├── SchemaResolutionInlineTest.java │ │ │ │ ├── annotations │ │ │ │ ├── AbstractAnnotationTest.java │ │ │ │ ├── callbacks │ │ │ │ │ └── CallbackTest.java │ │ │ │ ├── definition │ │ │ │ │ └── OpenApiDefinitionTest.java │ │ │ │ ├── encoding │ │ │ │ │ └── EncodingTest.java │ │ │ │ ├── examples │ │ │ │ │ └── ExamplesTest.java │ │ │ │ ├── info │ │ │ │ │ └── InfoTest.java │ │ │ │ ├── operations │ │ │ │ │ ├── AnnotatedOperationMethodTest.java │ │ │ │ │ └── MergedOperationTest.java │ │ │ │ ├── parameters │ │ │ │ │ └── ParametersTest.java │ │ │ │ ├── pathItems │ │ │ │ │ └── OperationsWithLinksTest.java │ │ │ │ ├── readerListener │ │ │ │ │ └── ReaderListenerTest.java │ │ │ │ ├── requests │ │ │ │ │ └── RequestBodyTest.java │ │ │ │ └── security │ │ │ │ │ └── SecurityTest.java │ │ │ │ ├── cdi2 │ │ │ │ ├── CDIAutodiscoveryTest.java │ │ │ │ └── DiscoveryTestExtension.java │ │ │ │ ├── integration │ │ │ │ ├── JaxrsApplicationAndAnnotationScannerTest.java │ │ │ │ ├── JaxrsApplicationAndResourcePackagesAnnotationScannerTest.java │ │ │ │ ├── JaxrsApplicationScannerTest.java │ │ │ │ └── SortedOutputTest.java │ │ │ │ ├── it │ │ │ │ ├── OpenApiResourceIT.java │ │ │ │ ├── model │ │ │ │ │ └── Widget.java │ │ │ │ └── resources │ │ │ │ │ ├── CarResource.java │ │ │ │ │ ├── MultiPartFileResource.java │ │ │ │ │ ├── OctetStreamResource.java │ │ │ │ │ ├── UrlEncodedResource.java │ │ │ │ │ └── WidgetResource.java │ │ │ │ ├── matchers │ │ │ │ └── SerializationMatchers.java │ │ │ │ ├── petstore │ │ │ │ ├── EmptyPetResource.java │ │ │ │ ├── PetResource.java │ │ │ │ ├── WebHookResource.java │ │ │ │ ├── callback │ │ │ │ │ ├── ComplexCallback31Resource.java │ │ │ │ │ ├── ComplexCallbackResource.java │ │ │ │ │ ├── MultipleCallbacksTestWithOperationResource.java │ │ │ │ │ ├── RepeatableCallbackResource.java │ │ │ │ │ └── SimpleCallbackWithOperationResource.java │ │ │ │ ├── example │ │ │ │ │ ├── ExamplesResource.java │ │ │ │ │ └── SubscriptionResponse.java │ │ │ │ ├── link │ │ │ │ │ ├── LinksAndContent31Resource.java │ │ │ │ │ └── LinksResource.java │ │ │ │ ├── openapidefintion │ │ │ │ │ ├── OpenAPI31DefinitionResource.java │ │ │ │ │ └── OpenAPIDefinitionResource.java │ │ │ │ ├── operation │ │ │ │ │ ├── AnnotatedSameNameOperationResource.java │ │ │ │ │ ├── ExternalDocumentationResource.java │ │ │ │ │ ├── FullyAnnotatedOperationResource.java │ │ │ │ │ ├── HiddenOperationResource.java │ │ │ │ │ ├── InterfaceResource.java │ │ │ │ │ ├── NotAnnotatedSameNameOperationResource.java │ │ │ │ │ ├── OperationResource.java │ │ │ │ │ ├── OperationWithoutAnnotationResource.java │ │ │ │ │ ├── ServerOperationResource.java │ │ │ │ │ └── SubResource.java │ │ │ │ ├── parameter │ │ │ │ │ ├── ArraySchemaResource.java │ │ │ │ │ ├── ComplexParameterResource.java │ │ │ │ │ ├── ComplexParameterWithOperationResource.java │ │ │ │ │ ├── MultipleNotAnnotatedParameter.java │ │ │ │ │ ├── OpenAPIJaxRSAnnotatedParameter.java │ │ │ │ │ ├── OpenAPIWithContentJaxRSAnnotatedParameter.java │ │ │ │ │ ├── OpenAPIWithImplementationJaxRSAnnotatedParameter.java │ │ │ │ │ ├── Parameters31Resource.java │ │ │ │ │ ├── ParametersResource.java │ │ │ │ │ ├── RepeatableParametersResource.java │ │ │ │ │ ├── SingleJaxRSAnnotatedParameter.java │ │ │ │ │ └── SingleNotAnnotatedParameter.java │ │ │ │ ├── requestbody │ │ │ │ │ ├── RequestBody31Resource.java │ │ │ │ │ ├── RequestBodyMethodPriorityResource.java │ │ │ │ │ ├── RequestBodyParameterPriorityResource.java │ │ │ │ │ └── RequestBodyResource.java │ │ │ │ ├── responses │ │ │ │ │ ├── ComplexResponseResource.java │ │ │ │ │ ├── ImplementationResponseResource.java │ │ │ │ │ ├── MethodResponseResource.java │ │ │ │ │ ├── NoImplementationResponseResource.java │ │ │ │ │ ├── NoResponseResource.java │ │ │ │ │ ├── OperationResponseResource.java │ │ │ │ │ └── PriorityResponseResource.java │ │ │ │ ├── security │ │ │ │ │ └── SecurityResource.java │ │ │ │ └── tags │ │ │ │ │ ├── CompleteTagResource.java │ │ │ │ │ ├── TagClassResource.java │ │ │ │ │ ├── TagMethodResource.java │ │ │ │ │ ├── TagOpenAPIDefinitionResource.java │ │ │ │ │ └── TagOperationResource.java │ │ │ │ ├── petstore31 │ │ │ │ ├── Category.java │ │ │ │ ├── Pet.java │ │ │ │ ├── PetData.java │ │ │ │ ├── PetResource.java │ │ │ │ ├── SimpleCategory.java │ │ │ │ ├── SimpleTag.java │ │ │ │ ├── Tag.java │ │ │ │ ├── TagResource.java │ │ │ │ └── User.java │ │ │ │ ├── resources │ │ │ │ ├── Address.java │ │ │ │ ├── ArraySchemaImplementationResource.java │ │ │ │ ├── BasicClass.java │ │ │ │ ├── BasicFieldsResource.java │ │ │ │ ├── BinaryParameterResource.java │ │ │ │ ├── BookStoreTicket2646.java │ │ │ │ ├── ClassPathParentResource.java │ │ │ │ ├── ClassPathSubResource.java │ │ │ │ ├── Client.java │ │ │ │ ├── CompleteFieldsResource.java │ │ │ │ ├── CreditCard.java │ │ │ │ ├── DefaultResponseResource.java │ │ │ │ ├── DeprecatedFieldsResource.java │ │ │ │ ├── DuplicatedOperationIdResource.java │ │ │ │ ├── DuplicatedOperationMethodNameResource.java │ │ │ │ ├── DuplicatedSecurityResource.java │ │ │ │ ├── EnhancedResponsesResource.java │ │ │ │ ├── EnumParameterResource.java │ │ │ │ ├── ExternalDocsReference.java │ │ │ │ ├── GenericResponsesResource.java │ │ │ │ ├── HiddenAnnotatedUserResource.java │ │ │ │ ├── HiddenUserResource.java │ │ │ │ ├── JsonIdentityCyclicResource.java │ │ │ │ ├── JsonIdentityResource.java │ │ │ │ ├── Misc31Resource.java │ │ │ │ ├── ModelWithOAS31Stuff.java │ │ │ │ ├── MyClass.java │ │ │ │ ├── MyOtherClass.java │ │ │ │ ├── MySuperClass.java │ │ │ │ ├── NoPathSubResource.java │ │ │ │ ├── ParameterMaximumValueResource.java │ │ │ │ ├── ParametersResource.java │ │ │ │ ├── PetResource.java │ │ │ │ ├── PetResourceSlashesinPath.java │ │ │ │ ├── PostalCodeNumberPattern.java │ │ │ │ ├── PostalCodePattern.java │ │ │ │ ├── QueryResultBean.java │ │ │ │ ├── ReaderListenerResource.java │ │ │ │ ├── RefCallbackResource.java │ │ │ │ ├── RefExamplesResource.java │ │ │ │ ├── RefHeaderResource.java │ │ │ │ ├── RefLinksResource.java │ │ │ │ ├── RefParameter3029Resource.java │ │ │ │ ├── RefParameter3074Resource.java │ │ │ │ ├── RefParameterResource.java │ │ │ │ ├── RefRequestBodyResource.java │ │ │ │ ├── RefResponsesResource.java │ │ │ │ ├── RefSecurityResource.java │ │ │ │ ├── ResourceWithJacksonBean.java │ │ │ │ ├── ResourceWithKnownInjections.java │ │ │ │ ├── ResourceWithSubResource.java │ │ │ │ ├── ResponseContentWithArrayResource.java │ │ │ │ ├── ResponseReturnTypeResource.java │ │ │ │ ├── ResponsesInterface.java │ │ │ │ ├── ResponsesResource.java │ │ │ │ ├── SchemaAdditionalPropertiesBooleanResource.java │ │ │ │ ├── SchemaAdditionalPropertiesResource.java │ │ │ │ ├── SchemaPropertiesResource.java │ │ │ │ ├── SecurityResource.java │ │ │ │ ├── ServersResource.java │ │ │ │ ├── SiblingPropResource.java │ │ │ │ ├── SiblingsResource.java │ │ │ │ ├── SiblingsResourceRequestBody.java │ │ │ │ ├── SiblingsResourceRequestBodyMultiple.java │ │ │ │ ├── SiblingsResourceResponse.java │ │ │ │ ├── SiblingsResourceSimple.java │ │ │ │ ├── SimpleCallbackResource.java │ │ │ │ ├── SimpleExamplesResource.java │ │ │ │ ├── SimpleMethods.java │ │ │ │ ├── SimpleParameterResource.java │ │ │ │ ├── SimpleRequestBodyResource.java │ │ │ │ ├── SimpleResourceWithVendorAnnotation.java │ │ │ │ ├── SimpleResponsesResource.java │ │ │ │ ├── SimpleUserResource.java │ │ │ │ ├── SingleExampleResource.java │ │ │ │ ├── SubResource.java │ │ │ │ ├── SubResourceHead.java │ │ │ │ ├── SubResourceTail.java │ │ │ │ ├── TagsResource.java │ │ │ │ ├── Test2607.java │ │ │ │ ├── TestResource.java │ │ │ │ ├── TestSub2607.java │ │ │ │ ├── TestSubResource.java │ │ │ │ ├── Ticket2340Resource.java │ │ │ │ ├── Ticket2644AnnotatedInterface.java │ │ │ │ ├── Ticket2644ConcreteImplementation.java │ │ │ │ ├── Ticket2763Resource.java │ │ │ │ ├── Ticket2793Resource.java │ │ │ │ ├── Ticket2794Resource.java │ │ │ │ ├── Ticket2806Resource.java │ │ │ │ ├── Ticket2818Resource.java │ │ │ │ ├── Ticket2848Resource.java │ │ │ │ ├── Ticket3015Resource.java │ │ │ │ ├── Ticket3587Resource.java │ │ │ │ ├── Ticket3731BisResource.java │ │ │ │ ├── Ticket3731Resource.java │ │ │ │ ├── Ticket4065Resource.java │ │ │ │ ├── Ticket4412Resource.java │ │ │ │ ├── Ticket4446Resource.java │ │ │ │ ├── Ticket4483Resource.java │ │ │ │ ├── Ticket4804CustomClass.java │ │ │ │ ├── Ticket4804NotBlankResource.java │ │ │ │ ├── Ticket4804ProcessorResource.java │ │ │ │ ├── Ticket4804Resource.java │ │ │ │ ├── Ticket4850Resource.java │ │ │ │ ├── Ticket4859Resource.java │ │ │ │ ├── Ticket4878Resource.java │ │ │ │ ├── Ticket4879Resource.java │ │ │ │ ├── UploadRequest.java │ │ │ │ ├── UploadResource.java │ │ │ │ ├── UrlEncodedResourceWithEncodings.java │ │ │ │ ├── UserAnnotation.java │ │ │ │ ├── UserAnnotationResource.java │ │ │ │ ├── UserResource.java │ │ │ │ ├── WebHookResource.java │ │ │ │ ├── data │ │ │ │ │ ├── PetData.java │ │ │ │ │ └── UserData.java │ │ │ │ ├── exception │ │ │ │ │ ├── ApiException.java │ │ │ │ │ └── NotFoundException.java │ │ │ │ ├── extensions │ │ │ │ │ ├── ExtensionsResource.java │ │ │ │ │ ├── OperationExtensionsResource.java │ │ │ │ │ ├── ParameterExtensionsResource.java │ │ │ │ │ └── RequestBodyExtensionsResource.java │ │ │ │ ├── generics │ │ │ │ │ ├── ticket2144 │ │ │ │ │ │ ├── BaseDTO.java │ │ │ │ │ │ ├── BaseResource.java │ │ │ │ │ │ ├── Item.java │ │ │ │ │ │ ├── ItemResource.java │ │ │ │ │ │ └── ItemWithChildren.java │ │ │ │ │ ├── ticket3149 │ │ │ │ │ │ ├── AggregateEndpoint.java │ │ │ │ │ │ ├── FirstEndpoint.java │ │ │ │ │ │ ├── MainResource.java │ │ │ │ │ │ ├── OriginalEndpoint.java │ │ │ │ │ │ ├── SampleDTO.java │ │ │ │ │ │ ├── SampleOtherDTO.java │ │ │ │ │ │ └── SecondEndpoint.java │ │ │ │ │ ├── ticket3426 │ │ │ │ │ │ ├── Parent.java │ │ │ │ │ │ └── Ticket3426Resource.java │ │ │ │ │ └── ticket3694 │ │ │ │ │ │ ├── Ticket3694Resource.java │ │ │ │ │ │ ├── Ticket3694ResourceExtendedType.java │ │ │ │ │ │ ├── Ticket3694ResourceInterface.java │ │ │ │ │ │ ├── Ticket3694ResourceInterfaceExtendedType.java │ │ │ │ │ │ ├── Ticket3694ResourceInterfaceSimple.java │ │ │ │ │ │ ├── Ticket3694ResourceInterfaceSimpleSameReturn.java │ │ │ │ │ │ ├── Ticket3694ResourceSimple.java │ │ │ │ │ │ └── Ticket3694ResourceSimpleSameReturn.java │ │ │ │ ├── model │ │ │ │ │ ├── Category.java │ │ │ │ │ ├── CustomGenerator.java │ │ │ │ │ ├── ExtensionUser.java │ │ │ │ │ ├── Item.java │ │ │ │ │ ├── JacksonBean.java │ │ │ │ │ ├── ListOfStringsBeanParam.java │ │ │ │ │ ├── ModelWithJsonIdentity.java │ │ │ │ │ ├── ModelWithJsonIdentityCyclic.java │ │ │ │ │ ├── MultipleBaseBean.java │ │ │ │ │ ├── MultipleSub1Bean.java │ │ │ │ │ ├── MultipleSub2Bean.java │ │ │ │ │ ├── NotFoundModel.java │ │ │ │ │ ├── Pet.java │ │ │ │ │ ├── Tag.java │ │ │ │ │ └── User.java │ │ │ │ ├── rs │ │ │ │ │ ├── AbstractEntityRestService.java │ │ │ │ │ ├── EntityRestService.java │ │ │ │ │ ├── PersistentDTO.java │ │ │ │ │ ├── ProcessTokenDTO.java │ │ │ │ │ └── ProcessTokenRestService.java │ │ │ │ ├── siblings │ │ │ │ │ ├── Category.java │ │ │ │ │ ├── Pet.java │ │ │ │ │ └── PetSimple.java │ │ │ │ └── ticket3624 │ │ │ │ │ ├── Service.java │ │ │ │ │ └── model │ │ │ │ │ ├── ByIdResponse.java │ │ │ │ │ ├── ContainerizedResponse.java │ │ │ │ │ ├── Model.java │ │ │ │ │ ├── ModelContainer.java │ │ │ │ │ └── Response.java │ │ │ │ ├── schemaResolution │ │ │ │ ├── SchemaResolutionAnnotatedResource.java │ │ │ │ ├── SchemaResolutionAnnotatedSimpleResource.java │ │ │ │ ├── SchemaResolutionResource.java │ │ │ │ └── SchemaResolutionResourceSimple.java │ │ │ │ └── util │ │ │ │ └── ServletUtilsTest.java │ │ └── org │ │ │ └── my │ │ │ └── project │ │ │ └── resources │ │ │ └── ResourceInPackageB.java │ │ ├── resources │ │ ├── BinaryParameterResource.yaml │ │ ├── examples │ │ │ ├── AnnotatedModelAndContentExample.yaml │ │ │ ├── AnnotatedModelExample.yaml │ │ │ ├── ParameterExample.yaml │ │ │ ├── RequestBodyContentExample.yaml │ │ │ ├── RequestBodyContentExampleWithConsumes.yaml │ │ │ ├── RequestBodyContentExampleWithMediatype.yaml │ │ │ ├── RequestBodyContentExampleWithSchema.yaml │ │ │ ├── RequestBodyContentExampleWithSchemaImplementation.yaml │ │ │ ├── ResponseExample.yaml │ │ │ ├── ResponseExampleSchema.yaml │ │ │ └── ResponseExampleSchemaImplementation.yaml │ │ ├── integration │ │ │ └── openapi-configuration.json │ │ ├── logback-test.xml │ │ └── petstore │ │ │ ├── EmptyPetResource.yaml │ │ │ ├── FullPetResource.yaml │ │ │ ├── OpenAPI31DefinitionResource.yaml │ │ │ ├── OpenAPIDefinitionResource.yaml │ │ │ ├── SecurityResource.yaml │ │ │ ├── WebHookResource.yaml │ │ │ ├── callbacks │ │ │ ├── ComplexCallback31Resource.yaml │ │ │ ├── ComplexCallbackResource.yaml │ │ │ ├── MultipleCallbacksTestWithOperationResource.yaml │ │ │ ├── RepeatableCallbackResource.yaml │ │ │ └── SimpleCallbackWithOperationResource.yaml │ │ │ ├── example │ │ │ └── ExamplesResource.yaml │ │ │ ├── links │ │ │ ├── LinksAndContent31Resource.yaml │ │ │ └── LinksResource.yaml │ │ │ ├── operation │ │ │ ├── AnnotatedSameNameOperationResource.yaml │ │ │ ├── ExternalDocumentationResource.yaml │ │ │ ├── FullyAnnotatedOperationResource.yaml │ │ │ ├── HiddenOperationResource.yaml │ │ │ ├── NotAnnotatedSameNameOperationResource.yaml │ │ │ ├── OperationResource.yaml │ │ │ ├── OperationWithoutAnnotationResource.yaml │ │ │ ├── ServerOperationResource.yaml │ │ │ └── SubResource.yaml │ │ │ ├── parameters │ │ │ ├── ArraySchemaResource.yaml │ │ │ ├── ComplexParameterResource.yaml │ │ │ ├── ComplexParameterWithOperationResource.yaml │ │ │ ├── MultipleNotAnnotatedParameter.yaml │ │ │ ├── OpenAPIJaxRSAnnotatedParameter.yaml │ │ │ ├── OpenAPIWithContentJaxRSAnnotatedParameter.yaml │ │ │ ├── OpenAPIWithImplementationJaxRSAnnotatedParameter.yaml │ │ │ ├── Parameters31Resource.yaml │ │ │ ├── ParametersResource.yaml │ │ │ ├── RepeatableParametersResource.yaml │ │ │ ├── SingleJaxRSAnnotatedParameter.yaml │ │ │ └── SingleNotAnnotatedParameter.yaml │ │ │ ├── requestbody │ │ │ ├── RequestBody31Resource.yaml │ │ │ ├── RequestBodyMethodPriorityResource.yaml │ │ │ ├── RequestBodyParameterPriorityResource.yaml │ │ │ └── RequestBodyResource.yaml │ │ │ ├── responses │ │ │ ├── ComplexResponseResource.yaml │ │ │ ├── ImplementationResponseResource.yaml │ │ │ ├── MethodResponseResource.yaml │ │ │ ├── NoImplementationResponseResource.yaml │ │ │ ├── NoResponseResource.yaml │ │ │ ├── OperationResponseResource.yaml │ │ │ └── PriorityResponseResource.yaml │ │ │ └── tags │ │ │ ├── CompleteTagResource.yaml │ │ │ ├── TagClassResource.yaml │ │ │ ├── TagMethodResource.yaml │ │ │ ├── TagOpenAPIDefinitionResource.yaml │ │ │ └── TagOperationResource.yaml │ │ └── webapp │ │ └── WEB-INF │ │ └── web.xml ├── swagger-maven-plugin │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── plugin │ │ │ └── maven │ │ │ ├── IncludeProjectDependenciesComponentConfigurator.java │ │ │ └── SwaggerMojo.java │ │ └── test │ │ ├── java │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── plugin │ │ │ └── maven │ │ │ ├── ASwaggerMavenIntegrationTest.java │ │ │ ├── BetterAbstractMojoTestCase.java │ │ │ ├── SwaggerConfigFileTest.java │ │ │ ├── SwaggerResolveTest.java │ │ │ ├── petstore │ │ │ ├── petstore │ │ │ │ ├── EmptyPetResource.java │ │ │ │ ├── PetResource.java │ │ │ │ ├── callback │ │ │ │ │ ├── ComplexCallbackResource.java │ │ │ │ │ ├── MultipleCallbacksTestWithOperationResource.java │ │ │ │ │ ├── RepeatableCallbackResource.java │ │ │ │ │ └── SimpleCallbackWithOperationResource.java │ │ │ │ ├── example │ │ │ │ │ ├── ExamplesResource.java │ │ │ │ │ └── SubscriptionResponse.java │ │ │ │ ├── link │ │ │ │ │ └── LinksResource.java │ │ │ │ ├── openapidefintion │ │ │ │ │ └── OpenAPIDefinitionResource.java │ │ │ │ ├── operation │ │ │ │ │ ├── AnnotatedSameNameOperationResource.java │ │ │ │ │ ├── ExternalDocumentationResource.java │ │ │ │ │ ├── FullyAnnotatedOperationResource.java │ │ │ │ │ ├── HiddenOperationResource.java │ │ │ │ │ ├── InterfaceResource.java │ │ │ │ │ ├── NotAnnotatedSameNameOperationResource.java │ │ │ │ │ ├── OperationResource.java │ │ │ │ │ ├── OperationWithoutAnnotationResource.java │ │ │ │ │ ├── ServerOperationResource.java │ │ │ │ │ └── SubResource.java │ │ │ │ ├── parameter │ │ │ │ │ ├── ArraySchemaResource.java │ │ │ │ │ ├── ComplexParameterResource.java │ │ │ │ │ ├── ComplexParameterWithOperationResource.java │ │ │ │ │ ├── MultipleNotAnnotatedParameter.java │ │ │ │ │ ├── OpenAPIJaxRSAnnotatedParameter.java │ │ │ │ │ ├── OpenAPIWithContentJaxRSAnnotatedParameter.java │ │ │ │ │ ├── OpenAPIWithImplementationJaxRSAnnotatedParameter.java │ │ │ │ │ ├── ParametersResource.java │ │ │ │ │ ├── RepeatableParametersResource.java │ │ │ │ │ ├── SingleJaxRSAnnotatedParameter.java │ │ │ │ │ └── SingleNotAnnotatedParameter.java │ │ │ │ ├── requestbody │ │ │ │ │ ├── RequestBodyMethodPriorityResource.java │ │ │ │ │ ├── RequestBodyParameterPriorityResource.java │ │ │ │ │ └── RequestBodyResource.java │ │ │ │ ├── responses │ │ │ │ │ ├── ComplexResponseResource.java │ │ │ │ │ ├── ImplementationResponseResource.java │ │ │ │ │ ├── MethodResponseResource.java │ │ │ │ │ ├── NoImplementationResponseResource.java │ │ │ │ │ ├── NoResponseResource.java │ │ │ │ │ ├── OperationResponseResource.java │ │ │ │ │ └── PriorityResponseResource.java │ │ │ │ ├── security │ │ │ │ │ └── SecurityResource.java │ │ │ │ └── tags │ │ │ │ │ ├── CompleteTagResource.java │ │ │ │ │ ├── TagClassResource.java │ │ │ │ │ ├── TagMethodResource.java │ │ │ │ │ ├── TagOpenAPIDefinitionResource.java │ │ │ │ │ └── TagOperationResource.java │ │ │ └── petstore31 │ │ │ │ └── PetResource.java │ │ │ └── resources │ │ │ ├── MyFilter.java │ │ │ ├── QueryResultBean.java │ │ │ ├── data │ │ │ ├── PetData.java │ │ │ └── UserData.java │ │ │ ├── exception │ │ │ ├── ApiException.java │ │ │ └── NotFoundException.java │ │ │ └── model │ │ │ ├── Category.java │ │ │ ├── CustomGenerator.java │ │ │ ├── ExtensionUser.java │ │ │ ├── JacksonBean.java │ │ │ ├── ListOfStringsBeanParam.java │ │ │ ├── ModelWithJsonIdentity.java │ │ │ ├── ModelWithJsonIdentityCyclic.java │ │ │ ├── MultipleBaseBean.java │ │ │ ├── MultipleSub1Bean.java │ │ │ ├── MultipleSub2Bean.java │ │ │ ├── NotFoundModel.java │ │ │ ├── Pet.java │ │ │ ├── Tag.java │ │ │ └── User.java │ │ └── resources │ │ ├── configurationFile.yaml │ │ ├── configurationFile2.yaml │ │ ├── logback-test.xml │ │ ├── openapiinput.json │ │ ├── openapiinput.yaml │ │ ├── openapiinput2.yaml │ │ ├── pom.resolveToFile.xml │ │ ├── pom.resolveToFile31.xml │ │ ├── pom.resolveToFileFromConfig.xml │ │ ├── pom.resolveToFileFromConfigAndOpenApi.xml │ │ ├── pom.resolveToFileFromConfigWithOAS3.1Filter.xml │ │ ├── pom.resolveToFileFromJsonInput.xml │ │ ├── pom.resolveToFileJsonAndYaml.xml │ │ ├── pom.resolveToFileNoName.xml │ │ └── pom.resolveToFileWithFilter.xml ├── swagger-models │ ├── CODE_COVERAGE.md │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── swagger │ │ │ └── v3 │ │ │ └── oas │ │ │ └── models │ │ │ ├── Components.java │ │ │ ├── ExternalDocumentation.java │ │ │ ├── OpenAPI.java │ │ │ ├── Operation.java │ │ │ ├── PathItem.java │ │ │ ├── Paths.java │ │ │ ├── SpecVersion.java │ │ │ ├── annotations │ │ │ ├── OpenAPI30.java │ │ │ └── OpenAPI31.java │ │ │ ├── callbacks │ │ │ └── Callback.java │ │ │ ├── examples │ │ │ └── Example.java │ │ │ ├── headers │ │ │ └── Header.java │ │ │ ├── info │ │ │ ├── Contact.java │ │ │ ├── Info.java │ │ │ └── License.java │ │ │ ├── links │ │ │ ├── Link.java │ │ │ └── LinkParameter.java │ │ │ ├── media │ │ │ ├── ArbitrarySchema.java │ │ │ ├── ArraySchema.java │ │ │ ├── BinarySchema.java │ │ │ ├── BooleanSchema.java │ │ │ ├── ByteArraySchema.java │ │ │ ├── ComposedSchema.java │ │ │ ├── Content.java │ │ │ ├── DateSchema.java │ │ │ ├── DateTimeSchema.java │ │ │ ├── Discriminator.java │ │ │ ├── EmailSchema.java │ │ │ ├── Encoding.java │ │ │ ├── EncodingProperty.java │ │ │ ├── FileSchema.java │ │ │ ├── IntegerSchema.java │ │ │ ├── JsonSchema.java │ │ │ ├── MapSchema.java │ │ │ ├── MediaType.java │ │ │ ├── NumberSchema.java │ │ │ ├── ObjectSchema.java │ │ │ ├── PasswordSchema.java │ │ │ ├── Schema.java │ │ │ ├── StringSchema.java │ │ │ ├── UUIDSchema.java │ │ │ └── XML.java │ │ │ ├── parameters │ │ │ ├── CookieParameter.java │ │ │ ├── HeaderParameter.java │ │ │ ├── Parameter.java │ │ │ ├── PathParameter.java │ │ │ ├── QueryParameter.java │ │ │ └── RequestBody.java │ │ │ ├── responses │ │ │ ├── ApiResponse.java │ │ │ └── ApiResponses.java │ │ │ ├── security │ │ │ ├── OAuthFlow.java │ │ │ ├── OAuthFlows.java │ │ │ ├── Scopes.java │ │ │ ├── SecurityRequirement.java │ │ │ └── SecurityScheme.java │ │ │ ├── servers │ │ │ ├── Server.java │ │ │ ├── ServerVariable.java │ │ │ └── ServerVariables.java │ │ │ └── tags │ │ │ └── Tag.java │ │ └── test │ │ └── java │ │ └── io │ │ └── swagger │ │ ├── test │ │ ├── SchemaTests.java │ │ └── SimpleBuilderTest.java │ │ └── v3 │ │ └── oas │ │ └── models │ │ ├── PathsTest.java │ │ └── links │ │ └── LinkParameterTest.java └── swagger-project-jakarta │ ├── .gitignore │ ├── modules │ ├── swagger-annotations-jakarta │ │ └── pom.xml │ ├── swagger-core-jakarta │ │ └── pom.xml │ ├── swagger-integration-jakarta │ │ └── pom.xml │ ├── swagger-jaxrs2-jakarta │ │ └── pom.xml │ ├── swagger-jaxrs2-servlet-initializer-jakarta │ │ └── pom.xml │ ├── swagger-jaxrs2-servlet-initializer-v2-jakarta │ │ └── pom.xml │ ├── swagger-maven-plugin-jakarta │ │ ├── pom.xml │ │ ├── src │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── swagger │ │ │ │ └── v3 │ │ │ │ └── plugin │ │ │ │ └── maven │ │ │ │ └── jakarta │ │ │ │ └── JakartaTransformer.java │ │ └── transformed │ │ │ └── README.md │ └── swagger-models-jakarta │ │ └── pom.xml │ └── pom.xml ├── mvnw ├── mvnw.cmd ├── pom.xml └── swagger-shot.jpg /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "maven" 4 | target-branch: "master" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | ignore: 9 | - dependency-name: "*" 10 | update-types: ["version-update:semver-major"] 11 | - package-ecosystem: "maven" 12 | target-branch: "1.5" 13 | directory: "/" 14 | schedule: 15 | interval: "daily" 16 | ignore: 17 | - dependency-name: "*" 18 | update-types: ["version-update:semver-major"] -------------------------------------------------------------------------------- /.github/topissuebot.yml: -------------------------------------------------------------------------------- 1 | labelName: ":thumbsup: Top Issue!" 2 | labelColor: "f442c2" 3 | numberOfIssuesToLabel: 5 4 | -------------------------------------------------------------------------------- /.github/workflows/dependency-review.yml: -------------------------------------------------------------------------------- 1 | name: 'Dependency Review' 2 | on: [pull_request] 3 | 4 | permissions: 5 | contents: read 6 | 7 | jobs: 8 | dependency-review: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: 'Checkout Repository' 12 | uses: actions/checkout@v4 13 | - name: Dependency Review 14 | uses: actions/dependency-review-action@v3 15 | with: 16 | fail-on-severity: high 17 | -------------------------------------------------------------------------------- /.github/workflows/maven-v1-pulls.yml: -------------------------------------------------------------------------------- 1 | name: Build Test PR 1.5 2 | 3 | on: 4 | pull_request: 5 | branches: [ "1.5" ] 6 | 7 | jobs: 8 | build: 9 | 10 | runs-on: ubuntu-latest 11 | strategy: 12 | matrix: 13 | java: [ 11, 17 ] 14 | 15 | steps: 16 | - uses: actions/checkout@v2 17 | - name: Set up Java 18 | uses: actions/setup-java@v1 19 | with: 20 | java-version: ${{ matrix.java }} 21 | - name: Cache local Maven repository 22 | uses: actions/cache@v4 23 | with: 24 | path: ~/.m2/repository 25 | key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} 26 | restore-keys: | 27 | ${{ runner.os }}-maven- 28 | - name: Build with Maven and Gradle 29 | run: ./mvnw -B -Dhttps.protocols=TLSv1.2 verify --file pom.xml 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | lib/*.jar 3 | target 4 | samples/scala-play2/logs 5 | .idea 6 | .idea_modules 7 | .settings 8 | .project 9 | .classpath 10 | .cache 11 | atlassian-ide-plugin.xml 12 | *.iml 13 | .java-version 14 | sonar-project.properties 15 | test-output/ 16 | *.pyc 17 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-core/852ed24f50f7b5f3cf9d162346362cdff25acc1f/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "settingsInheritedFrom": "swagger-api/whitesource-config@main", 3 | "scanSettings": { 4 | "baseBranches": ["master", "1.5"] 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /CI/lastRelease.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import ghApiClient 4 | 5 | def getLastReleaseTag(): 6 | content = ghApiClient.readUrl('repos/swagger-api/swagger-core/releases') 7 | for l in content: 8 | draft = l["draft"] 9 | tag = l["tag_name"] 10 | if str(draft) != 'True' and tag.startswith("v2"): 11 | return tag[1:] 12 | 13 | # main 14 | def main(): 15 | result = getLastReleaseTag() 16 | print (result) 17 | 18 | # here start main 19 | main() 20 | -------------------------------------------------------------------------------- /CI/prepare-javadocs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CUR=$(pwd) 4 | TMPDIR="$(dirname -- "${0}")" 5 | 6 | SC_RELEASE_TAG="v$SC_VERSION" 7 | 8 | ##################### 9 | ### publish javadocs 10 | ##################### 11 | 12 | cp -aR $CUR/modules/swagger-annotations/target/javadocprep/swagger-core/${SC_VERSION}/apidocs $TMPDIR 13 | cp -a $CUR/CI/publish-javadocs.sh $TMPDIR/publish-javadocs.sh 14 | 15 | -------------------------------------------------------------------------------- /CI/publish-javadocs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CUR=$(pwd) 4 | TMPDIR="$(dirname -- "${0}")" 5 | 6 | SC_RELEASE_TAG="v$SC_VERSION" 7 | 8 | ##################### 9 | ### publish javadocs 10 | ##################### 11 | 12 | mkdir -p $CUR/swagger-core/${SC_RELEASE_TAG} 13 | cp -aR $TMPDIR/apidocs $CUR/swagger-core/${SC_RELEASE_TAG} 14 | git add -A 15 | git commit -m "apidocs for release ${SC_RELEASE_TAG}" 16 | git push -u origin gh-pages 17 | -------------------------------------------------------------------------------- /CI/publishRelease.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | import ghApiClient 5 | 6 | def lastReleaseId(tag): 7 | content = ghApiClient.readUrl('repos/swagger-api/swagger-core/releases') 8 | for l in content: 9 | draft = l["draft"] 10 | draft_tag = l["tag_name"] 11 | if str(draft) == 'True' and tag == draft_tag: 12 | return l["id"] 13 | 14 | def publishRelease(tag): 15 | id = lastReleaseId(tag) 16 | payload = "{\"tag_name\":\"" + tag + "\", " 17 | payload += "\"draft\":" + "false" + ", " 18 | payload += "\"target_commitish\":\"" + "master" + "\"}" 19 | content = ghApiClient.postUrl('repos/swagger-api/swagger-core/releases/' + str(id), payload) 20 | return content 21 | 22 | # main 23 | def main(tag): 24 | publishRelease (tag) 25 | 26 | # here start main 27 | main(sys.argv[1]) 28 | -------------------------------------------------------------------------------- /CI/update-v1-readme.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | SC_LAST_RELEASE="$1" 3 | SC_VERSION="$2" 4 | 5 | CUR=$(pwd) 6 | 7 | ##################### 8 | ### update v2 versions in readme 9 | ##################### 10 | sc_find="$SC_LAST_RELEASE (\*\*current stable\*\*)" 11 | sc_replace="$SC_LAST_RELEASE " 12 | sed -i -e "s/$sc_find/$sc_replace/g" $CUR/README.md 13 | 14 | # update readme with a line for the new release replacing the previous 15 | CURDATE=$(date +"%Y-%m-%d") 16 | sc_find="------------------------- | ------------ | -------------------------- | ----- | ----" 17 | sc_add="$SC_VERSION (**current stable**)| $CURDATE | 3.x | [tag v$SC_VERSION](https:\/\/github.com\/swagger-api\/swagger-core\/tree\/v$SC_VERSION) | Supported" 18 | sc_replace="$sc_find\n$sc_add" 19 | sed -i -e "s/$sc_find/$sc_replace/g" $CUR/README.md 20 | -------------------------------------------------------------------------------- /CI/update-wiki.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CUR=$(pwd) 4 | 5 | ##################### 6 | ### update Wiki 7 | ##################### 8 | cd wiki 9 | sc_find="$SC_LAST_RELEASE\/" 10 | sc_replace="$SC_VERSION\/" 11 | sed -i -e "s/$sc_find/$sc_replace/g" $CUR/wiki/Swagger-2.X---Annotations.md 12 | git add -A 13 | git commit -m "update javadocs links to ${SC_VERSION}" 14 | git push -u origin master 15 | cd .. 16 | 17 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Swagger Core - ${pom.name} 2 | Copyright (c) 2015. SmartBear Software Inc. 3 | Swagger Core - ${pom.name} is licensed under Apache 2.0 license. 4 | Copy of the Apache 2.0 license can be found in `LICENSE` file. 5 | -------------------------------------------------------------------------------- /modules/swagger-annotations/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Hidden.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.annotations; 2 | 3 | import java.lang.annotation.Retention; 4 | import java.lang.annotation.RetentionPolicy; 5 | import java.lang.annotation.Target; 6 | 7 | import static java.lang.annotation.ElementType.ANNOTATION_TYPE; 8 | import static java.lang.annotation.ElementType.TYPE; 9 | import static java.lang.annotation.ElementType.FIELD; 10 | import static java.lang.annotation.ElementType.METHOD; 11 | 12 | /** 13 | * Marks a given resource, class or bean type as hidden, skipping while reading / resolving 14 | **/ 15 | @Target({METHOD, TYPE, FIELD, ANNOTATION_TYPE}) 16 | @Retention(RetentionPolicy.RUNTIME) 17 | public @interface Hidden { 18 | 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/OpenAPI31.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.annotations; 2 | 3 | import java.lang.annotation.Inherited; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | import static java.lang.annotation.ElementType.ANNOTATION_TYPE; 9 | import static java.lang.annotation.ElementType.METHOD; 10 | 11 | @Target({METHOD, ANNOTATION_TYPE}) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | @Inherited 14 | public @interface OpenAPI31 {} 15 | -------------------------------------------------------------------------------- /modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/Parameters.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.annotations; 2 | 3 | import java.lang.annotation.Inherited; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | import static java.lang.annotation.ElementType.ANNOTATION_TYPE; 9 | import static java.lang.annotation.ElementType.METHOD; 10 | 11 | /** 12 | * Container for repeatable {@link Parameter} annotation 13 | * 14 | * @see Parameter 15 | */ 16 | @Target({METHOD, ANNOTATION_TYPE}) 17 | @Retention(RetentionPolicy.RUNTIME) 18 | @Inherited 19 | public @interface Parameters { 20 | /** 21 | * An array of Parameters Objects for the operation 22 | * 23 | * @return the parameters 24 | */ 25 | Parameter[] value() default {}; 26 | } 27 | -------------------------------------------------------------------------------- /modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/StringToClassMapItem.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.annotations; 2 | 3 | import java.lang.annotation.Inherited; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | import static java.lang.annotation.ElementType.ANNOTATION_TYPE; 9 | import static java.lang.annotation.ElementType.METHOD; 10 | 11 | @Target({METHOD, ANNOTATION_TYPE}) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | @Inherited 14 | public @interface StringToClassMapItem { 15 | String key(); 16 | Class value(); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/Explode.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.annotations.enums; 2 | 3 | public enum Explode { 4 | DEFAULT, FALSE, TRUE; 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/ParameterIn.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.annotations.enums; 2 | 3 | public enum ParameterIn { 4 | DEFAULT(""), 5 | HEADER("header"), 6 | QUERY("query"), 7 | PATH("path"), 8 | COOKIE("cookie"); 9 | 10 | private String value; 11 | 12 | ParameterIn(String value) { 13 | this.value = value; 14 | } 15 | 16 | @Override 17 | public String toString() { 18 | return String.valueOf(value); 19 | } 20 | } -------------------------------------------------------------------------------- /modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/ParameterStyle.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.annotations.enums; 2 | 3 | public enum ParameterStyle { 4 | DEFAULT(""), 5 | MATRIX("matrix"), 6 | LABEL("label"), 7 | FORM("form"), 8 | SPACEDELIMITED("spaceDelimited"), 9 | PIPEDELIMITED("pipeDelimited"), 10 | DEEPOBJECT("deepObject"), 11 | SIMPLE("simple"); 12 | 13 | private String value; 14 | 15 | ParameterStyle(String value) { 16 | this.value = value; 17 | } 18 | 19 | @Override 20 | public String toString() { 21 | return String.valueOf(value); 22 | } 23 | } -------------------------------------------------------------------------------- /modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/SecuritySchemeIn.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.annotations.enums; 2 | 3 | public enum SecuritySchemeIn { 4 | DEFAULT(""), 5 | HEADER("header"), 6 | QUERY("query"), 7 | COOKIE("cookie"); 8 | 9 | private String value; 10 | 11 | SecuritySchemeIn(String value) { 12 | this.value = value; 13 | } 14 | 15 | @Override 16 | public String toString() { 17 | return String.valueOf(value); 18 | } 19 | } -------------------------------------------------------------------------------- /modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/enums/SecuritySchemeType.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.annotations.enums; 2 | 3 | public enum SecuritySchemeType { 4 | DEFAULT(""), 5 | APIKEY("apiKey"), 6 | HTTP("http"), 7 | OPENIDCONNECT("openIdConnect"), 8 | MUTUALTLS("mutualTLS"), 9 | OAUTH2("oauth2"); 10 | 11 | private String value; 12 | 13 | SecuritySchemeType(String value) { 14 | this.value = value; 15 | } 16 | 17 | @Override 18 | public String toString() { 19 | return String.valueOf(value); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/parameters/ValidatedParameter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.annotations.parameters; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Variant of JSR-303's jakarta.validation.Valid, supporting the 10 | * specification of validation groups. 11 | **/ 12 | @Target({ElementType.PARAMETER}) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | public @interface ValidatedParameter { 15 | Class[] value() default {}; 16 | } 17 | -------------------------------------------------------------------------------- /modules/swagger-annotations/src/main/java/io/swagger/v3/oas/annotations/security/OAuthScope.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.annotations.security; 2 | 3 | import java.lang.annotation.Inherited; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Represents an OAuth scope. 10 | **/ 11 | @Target({}) 12 | @Retention(RetentionPolicy.RUNTIME) 13 | @Inherited 14 | public @interface OAuthScope { 15 | /** 16 | * Name of the scope. 17 | * 18 | * @return String name 19 | */ 20 | String name() default ""; 21 | 22 | /** 23 | * Short description of the scope. 24 | * 25 | * @return String description 26 | */ 27 | String description() default ""; 28 | } 29 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/converter/ModelConverter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.converter; 2 | 3 | import io.swagger.v3.oas.models.media.Schema; 4 | 5 | import java.util.Iterator; 6 | 7 | public interface ModelConverter { 8 | 9 | /** 10 | * @param type 11 | * @param context 12 | * @param chain the chain of model converters to try if this implementation cannot process 13 | * @return null if this ModelConverter cannot convert the given Type 14 | */ 15 | Schema resolve(AnnotatedType type, ModelConverterContext context, Iterator chain); 16 | 17 | default boolean isOpenapi31() { 18 | return false; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/converter/ResolvedSchema.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.converter; 2 | 3 | import io.swagger.v3.oas.models.media.Schema; 4 | 5 | import java.util.Map; 6 | 7 | public class ResolvedSchema { 8 | public Schema schema; 9 | public Map referencedSchemas; 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/PackageVersion.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.jackson; 2 | 3 | import com.fasterxml.jackson.core.Version; 4 | import com.fasterxml.jackson.core.Versioned; 5 | import com.fasterxml.jackson.core.util.VersionUtil; 6 | 7 | public final class PackageVersion implements Versioned { 8 | public static final Version VERSION = VersionUtil.parseVersion( 9 | "0.5.1-SNAPSHOT", "io.swagger", "swagger-core"); 10 | 11 | @Override 12 | public Version version() { 13 | return VERSION; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/SwaggerModule.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.jackson; 2 | 3 | import com.fasterxml.jackson.databind.module.SimpleModule; 4 | 5 | public class SwaggerModule extends SimpleModule { 6 | private static final long serialVersionUID = 1L; 7 | 8 | public SwaggerModule() { 9 | super(PackageVersion.VERSION); 10 | } 11 | 12 | @Override 13 | public void setupModule(SetupContext context) { 14 | super.setupModule(context); 15 | context.insertAnnotationIntrospector(new SwaggerAnnotationIntrospector()); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/Components31Mixin.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.jackson.mixin; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAnyGetter; 4 | import com.fasterxml.jackson.annotation.JsonAnySetter; 5 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; 6 | import io.swagger.v3.core.jackson.CallbackSerializer; 7 | import io.swagger.v3.oas.models.callbacks.Callback; 8 | 9 | import java.util.Map; 10 | 11 | public abstract class Components31Mixin { 12 | 13 | @JsonAnyGetter 14 | public abstract Map getExtensions(); 15 | 16 | @JsonAnySetter 17 | public abstract void addExtension(String name, Object value); 18 | 19 | @JsonSerialize(contentUsing = CallbackSerializer.class) 20 | public abstract Map getCallbacks(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/Discriminator31Mixin.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.jackson.mixin; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAnyGetter; 4 | import com.fasterxml.jackson.annotation.JsonAnySetter; 5 | 6 | import java.util.Map; 7 | 8 | public abstract class Discriminator31Mixin { 9 | 10 | @JsonAnyGetter 11 | public abstract Map getExtensions(); 12 | 13 | @JsonAnySetter 14 | public abstract void addExtension(String name, Object value); 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/DiscriminatorMixin.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.jackson.mixin; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | 5 | import java.util.Map; 6 | 7 | public abstract class DiscriminatorMixin { 8 | 9 | @JsonIgnore 10 | public abstract Map getExtensions(); 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/ExampleMixin.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.jackson.mixin; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAnyGetter; 4 | import com.fasterxml.jackson.annotation.JsonAnySetter; 5 | import com.fasterxml.jackson.annotation.JsonIgnore; 6 | import com.fasterxml.jackson.annotation.JsonInclude; 7 | 8 | import java.util.Map; 9 | 10 | public abstract class ExampleMixin { 11 | @JsonAnyGetter 12 | public abstract Map getExtensions(); 13 | 14 | @JsonAnySetter 15 | public abstract void addExtension(String name, Object value); 16 | 17 | @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) 18 | public abstract Object getValue(); 19 | 20 | @JsonIgnore 21 | public abstract boolean getValueSetFlag(); 22 | } 23 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/ExtensionsMixin.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.jackson.mixin; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAnyGetter; 4 | import com.fasterxml.jackson.annotation.JsonAnySetter; 5 | 6 | import java.util.Map; 7 | 8 | public abstract class ExtensionsMixin { 9 | 10 | @JsonAnyGetter 11 | public abstract Map getExtensions(); 12 | 13 | @JsonAnySetter 14 | public abstract void addExtension(String name, Object value); 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/Info31Mixin.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.jackson.mixin; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAnyGetter; 4 | import com.fasterxml.jackson.annotation.JsonAnySetter; 5 | 6 | import java.util.Map; 7 | 8 | public abstract class Info31Mixin { 9 | 10 | @JsonAnyGetter 11 | public abstract Map getExtensions(); 12 | 13 | @JsonAnySetter 14 | public abstract void addExtension(String name, Object value); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/InfoMixin.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.jackson.mixin; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAnyGetter; 4 | import com.fasterxml.jackson.annotation.JsonAnySetter; 5 | import com.fasterxml.jackson.annotation.JsonIgnore; 6 | 7 | import java.util.Map; 8 | 9 | public abstract class InfoMixin { 10 | 11 | @JsonAnyGetter 12 | public abstract Map getExtensions(); 13 | 14 | @JsonAnySetter 15 | public abstract void addExtension(String name, Object value); 16 | 17 | @JsonIgnore 18 | public abstract String getSummary(); 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/LicenseMixin.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.jackson.mixin; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAnyGetter; 4 | import com.fasterxml.jackson.annotation.JsonAnySetter; 5 | import com.fasterxml.jackson.annotation.JsonIgnore; 6 | 7 | import java.util.Map; 8 | 9 | public abstract class LicenseMixin { 10 | 11 | @JsonAnyGetter 12 | public abstract Map getExtensions(); 13 | 14 | @JsonAnySetter 15 | public abstract void addExtension(String name, Object value); 16 | 17 | @JsonIgnore 18 | public abstract String getIdentifier(); 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/MediaTypeMixin.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.jackson.mixin; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAnyGetter; 4 | import com.fasterxml.jackson.annotation.JsonAnySetter; 5 | import com.fasterxml.jackson.annotation.JsonIgnore; 6 | import com.fasterxml.jackson.annotation.JsonInclude; 7 | 8 | import java.util.Map; 9 | 10 | public abstract class MediaTypeMixin { 11 | 12 | @JsonAnyGetter 13 | public abstract Map getExtensions(); 14 | 15 | @JsonAnySetter 16 | public abstract void addExtension(String name, Object value); 17 | 18 | @JsonIgnore 19 | public abstract boolean getExampleSetFlag(); 20 | 21 | @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) 22 | public abstract Object getExample(); 23 | } 24 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/mixin/OpenAPI31Mixin.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.jackson.mixin; 2 | 3 | import com.fasterxml.jackson.annotation.JsonAnyGetter; 4 | import com.fasterxml.jackson.annotation.JsonAnySetter; 5 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; 6 | import io.swagger.v3.core.jackson.PathsSerializer; 7 | import io.swagger.v3.oas.models.Paths; 8 | 9 | import java.util.Map; 10 | 11 | public abstract class OpenAPI31Mixin { 12 | 13 | @JsonAnyGetter 14 | public abstract Map getExtensions(); 15 | 16 | @JsonAnySetter 17 | public abstract void addExtension(String name, Object value); 18 | 19 | @JsonSerialize(using = PathsSerializer.class) 20 | public abstract Paths getPaths(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/model/ApiDescription.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.model; 2 | 3 | public class ApiDescription { 4 | private String path; 5 | private String method; 6 | 7 | public ApiDescription(String path, String method) { 8 | this.setPath(path); 9 | this.setMethod(method); 10 | } 11 | 12 | public String getPath() { 13 | return path; 14 | } 15 | 16 | public void setPath(String path) { 17 | this.path = path; 18 | } 19 | 20 | public String getMethod() { 21 | return method; 22 | } 23 | 24 | public void setMethod(String method) { 25 | this.method = method; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/util/ApiResponses31Deserializer.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.util; 2 | 3 | public class ApiResponses31Deserializer extends ApiResponsesDeserializer { 4 | 5 | public ApiResponses31Deserializer() { 6 | this.openapi31 = true; 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/util/Callback31Deserializer.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.util; 2 | 3 | public class Callback31Deserializer extends CallbackDeserializer { 4 | 5 | public Callback31Deserializer() { 6 | openapi31 = true; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/util/Constants.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.util; 2 | 3 | public final class Constants { 4 | public static final String COMMA = ","; 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/util/Model31Deserializer.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.util; 2 | 3 | public class Model31Deserializer extends ModelDeserializer { 4 | 5 | public Model31Deserializer() {this.openapi31 = true;} 6 | } 7 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/util/Parameter31Deserializer.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.util; 2 | 3 | public class Parameter31Deserializer extends ParameterDeserializer { 4 | 5 | public Parameter31Deserializer() { 6 | this.openapi31 = true; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/util/Paths31Deserializer.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.util; 2 | 3 | public class Paths31Deserializer extends PathsDeserializer { 4 | 5 | public Paths31Deserializer() { 6 | this.openapi31 = true; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-core/src/main/java/io/swagger/v3/core/util/SecurityScheme31Deserializer.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.util; 2 | 3 | public class SecurityScheme31Deserializer extends SecuritySchemeDeserializer { 4 | 5 | public SecurityScheme31Deserializer() { 6 | openapi31 = true; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/converting/override/resources/MyCustomClass.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.converting.override.resources; 2 | 3 | public class MyCustomClass { 4 | // does nothing, really 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/NoOpOperationsFilter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.filter.resources; 2 | 3 | import io.swagger.v3.core.filter.AbstractSpecFilter; 4 | 5 | /** 6 | * Does nothing 7 | **/ 8 | public class NoOpOperationsFilter extends AbstractSpecFilter { 9 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/NoOpenAPIFilter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.filter.resources; 2 | 3 | import io.swagger.v3.core.filter.AbstractSpecFilter; 4 | import io.swagger.v3.oas.models.OpenAPI; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | import java.util.Optional; 9 | 10 | /** 11 | * Does nothing 12 | **/ 13 | public class NoOpenAPIFilter extends AbstractSpecFilter { 14 | 15 | public static final String VERSION = "3.0.1"; 16 | 17 | @Override 18 | public Optional filterOpenAPI(OpenAPI openAPI, Map> params, Map cookies, Map> headers) { 19 | if (VERSION.equals(openAPI.getOpenapi())) { 20 | return Optional.empty(); 21 | } 22 | return Optional.of(openAPI); 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/filter/resources/RemoveUnreferencedDefinitionsFilter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.filter.resources; 2 | 3 | import io.swagger.v3.core.filter.AbstractSpecFilter; 4 | 5 | /** 6 | * signals to remove unreferenced definitions. 7 | **/ 8 | public class RemoveUnreferencedDefinitionsFilter extends AbstractSpecFilter { 9 | @Override 10 | public boolean isRemovingUnreferencedDefinitions() { 11 | return true; 12 | } 13 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Address.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import javax.xml.bind.annotation.XmlElement; 4 | 5 | public class Address { 6 | private Integer streetNumber; 7 | 8 | @XmlElement(name = "streetNumber") 9 | public Integer getStreetNumber() { 10 | return streetNumber; 11 | } 12 | 13 | public void setStreetNumber(Integer streetNumber) { 14 | this.streetNumber = streetNumber; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ApiFirstRequiredFieldModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | import javax.xml.bind.annotation.XmlAccessType; 6 | import javax.xml.bind.annotation.XmlAccessorType; 7 | import javax.xml.bind.annotation.XmlElement; 8 | import javax.xml.bind.annotation.XmlRootElement; 9 | 10 | @XmlRootElement 11 | @XmlAccessorType(XmlAccessType.FIELD) 12 | @Schema(name = "aaa") 13 | public class ApiFirstRequiredFieldModel { 14 | @Schema(name = "bla", required = true) 15 | @XmlElement(name = "a") 16 | public String getA() { 17 | return "aaa"; 18 | } 19 | 20 | public String getC() { 21 | return "kkk"; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Car.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class Car { 6 | @Schema(accessMode = Schema.AccessMode.READ_ONLY) 7 | public Integer getWheelCount() { 8 | return new Integer(4); 9 | } 10 | 11 | public void setWheelCount(Integer wheelCount) { 12 | // does nothing 13 | } 14 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Cat.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.core.oas.models.composition.Pet; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | 6 | @Schema 7 | public interface Cat extends Pet { 8 | Integer getClawCount(); 9 | 10 | void setClawCount(Integer name); 11 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Children.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | public class Children { 4 | public String getName() { 5 | return null; 6 | } 7 | 8 | public void setName(String name) { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/EmptyModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | public class EmptyModel { 4 | } 5 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Error.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | public class Error { 4 | int code; 5 | String message; 6 | 7 | public Error() { 8 | } 9 | 10 | public Error(int code, String message) { 11 | this.code = code; 12 | this.message = message; 13 | } 14 | 15 | public int getCode() { 16 | return code; 17 | } 18 | 19 | public void setCode(int code) { 20 | this.code = code; 21 | } 22 | 23 | public String getMessage() { 24 | return message; 25 | } 26 | 27 | public void setMessage(String message) { 28 | this.message = message; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/GuavaModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import com.google.common.base.Optional; 4 | 5 | public class GuavaModel { 6 | private Optional name; 7 | 8 | public Optional getName() { 9 | return name; 10 | } 11 | 12 | public void setName(Optional name) { 13 | this.name = name; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Issue534.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlElementWrapper; 7 | import java.util.List; 8 | 9 | public class Issue534 { 10 | public String name; 11 | 12 | @XmlElementWrapper(name = "order_specials") 13 | @XmlElement(name = "order_special") 14 | @Schema(hidden = true) 15 | public List getOrder_specials() { 16 | return null; 17 | } 18 | 19 | public void setOrder_specials(List items) { 20 | 21 | } 22 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JCovariantGetter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public abstract class JCovariantGetter { 6 | @Schema 7 | public Object getMyProperty() { 8 | return "42"; 9 | } 10 | 11 | @Schema 12 | public Object getMyOtherProperty() { 13 | return "42"; 14 | } 15 | 16 | public static class Sub extends JCovariantGetter { 17 | @Override 18 | public Integer getMyProperty() { 19 | return 42; 20 | } 21 | 22 | @Override 23 | public Integer getMyOtherProperty() { 24 | return 42; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonIntegerValueEnum.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import com.fasterxml.jackson.annotation.JsonValue; 4 | import io.swagger.v3.oas.annotations.Hidden; 5 | 6 | /** 7 | * Enum holds values different from names. Schema model will derive Integer value from jackson annotation JsonValue on public method. 8 | */ 9 | public enum JacksonIntegerValueEnum { 10 | FIRST(2), 11 | SECOND(4), 12 | THIRD(6), 13 | @Hidden HIDDEN(-1); 14 | 15 | private final int value; 16 | 17 | JacksonIntegerValueEnum(int value) { 18 | this.value = value; 19 | } 20 | 21 | @JsonValue 22 | public Integer getValue() { 23 | return value; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonIntegerValueFieldEnum.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import com.fasterxml.jackson.annotation.JsonValue; 4 | import io.swagger.v3.oas.annotations.Hidden; 5 | 6 | /** 7 | * Enum holds values different from names. Schema model will derive Integer value from jackson annotation JsonValue on private field. 8 | */ 9 | public enum JacksonIntegerValueFieldEnum { 10 | FIRST(2), 11 | SECOND(4), 12 | THIRD(6), 13 | @Hidden HIDDEN(-1); 14 | 15 | @JsonValue 16 | private final int value; 17 | 18 | JacksonIntegerValueFieldEnum(int value) { 19 | this.value = value; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonPropertyEnum.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import io.swagger.v3.oas.annotations.Hidden; 5 | 6 | public enum JacksonPropertyEnum { 7 | @JsonProperty("p1") PRIVATE, 8 | @JsonProperty("p2") PUBLIC, 9 | SYSTEM, 10 | INVITE_ONLY, 11 | @Hidden HIDDEN 12 | } 13 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonReadonlyModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | import com.fasterxml.jackson.annotation.JsonProperty; 5 | 6 | public class JacksonReadonlyModel { 7 | @JsonProperty (access = JsonProperty.Access.READ_ONLY) 8 | public Integer getCount() { 9 | return null; 10 | } 11 | 12 | @JsonIgnore 13 | public void setCount(Integer count) { 14 | 15 | } 16 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonValueEnum.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import com.fasterxml.jackson.annotation.JsonValue; 4 | import io.swagger.v3.oas.annotations.Hidden; 5 | 6 | /** 7 | * Enum holds values different from names. Schema model will derive String value from jackson annotation JsonValue on public method. 8 | */ 9 | public enum JacksonValueEnum { 10 | FIRST("one"), 11 | SECOND("two"), 12 | THIRD("three"), 13 | @Hidden HIDDEN("hidden"); 14 | 15 | private final String value; 16 | 17 | JacksonValueEnum(String value) { 18 | this.value = value; 19 | } 20 | 21 | @JsonValue 22 | public String getValue() { 23 | return value; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonValueFieldEnum.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import com.fasterxml.jackson.annotation.JsonValue; 4 | import io.swagger.v3.oas.annotations.Hidden; 5 | 6 | /** 7 | * Enum holds values different from names. Schema model will derive String value from jackson annotation JsonValue on private field. 8 | */ 9 | public enum JacksonValueFieldEnum { 10 | FIRST("one"), 11 | SECOND("two"), 12 | THIRD("three"), 13 | @Hidden HIDDEN("hidden"); 14 | 15 | @JsonValue 16 | private final String value; 17 | 18 | JacksonValueFieldEnum(String value) { 19 | this.value = value; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JacksonValuePrivateEnum.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import com.fasterxml.jackson.annotation.JsonValue; 4 | import io.swagger.v3.oas.annotations.Hidden; 5 | 6 | /** 7 | * Enum holds values different from names. Schema model will derive String value from jackson annotation JsonValue on private method. 8 | */ 9 | public enum JacksonValuePrivateEnum { 10 | FIRST("one"), 11 | SECOND("two"), 12 | THIRD("three"), 13 | @Hidden HIDDEN("hidden"); 14 | 15 | private final String value; 16 | 17 | JacksonValuePrivateEnum(String value) { 18 | this.value = value; 19 | } 20 | 21 | @JsonValue 22 | private String getValue() { 23 | return value; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/JodaDateTimeModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import org.joda.time.DateTime; 4 | 5 | public class JodaDateTimeModel { 6 | private DateTime createdAt; 7 | 8 | public DateTime getCreatedAt() { 9 | return createdAt; 10 | } 11 | 12 | public void setCreatedAt(DateTime createdAt) { 13 | this.createdAt = createdAt; 14 | } 15 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Manufacturers.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import java.util.HashSet; 4 | 5 | public class Manufacturers { 6 | private HashSet countries; 7 | 8 | public HashSet getCountries() { 9 | return countries; 10 | } 11 | 12 | public void setCountries(HashSet countries) { 13 | this.countries = countries; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/Model1979.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class Model1979 { 6 | @Schema(nullable = true) 7 | public String id; 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelPropertyName.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | public class ModelPropertyName { 4 | public boolean is_persistent() { 5 | return true; 6 | } 7 | 8 | public String gettersAndHaters() { 9 | return null; 10 | } 11 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithAltPropertyName.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema(name = "sample_model") 6 | public class ModelWithAltPropertyName { 7 | protected int id; 8 | 9 | @Schema( 10 | name = "the_id", 11 | description = "Note, this is server generated.", 12 | title = "Read-only") 13 | public int getId() { 14 | return id; 15 | } 16 | 17 | public void setId(int id) { 18 | this.id = id; 19 | } 20 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithApiModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema(name = "MyModel") 6 | public class ModelWithApiModel { 7 | public String name; 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithBooleanProperty.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class ModelWithBooleanProperty { 6 | @Schema(allowableValues = "true") 7 | public Boolean isGreat; 8 | 9 | @Schema(allowableValues = {"1", "2"}) 10 | public Integer intValue; 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithEnumArray.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import java.util.Set; 4 | 5 | public class ModelWithEnumArray { 6 | private Set actions; 7 | 8 | public Set getActions() { 9 | return actions; 10 | } 11 | 12 | public enum Action { 13 | CREATE, UPDATE, DELETE, COPY; 14 | } 15 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithEnumField.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | public class ModelWithEnumField { 4 | public TestEnum enumValue; 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithEnumProperty.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | public class ModelWithEnumProperty { 4 | private TestEnum e; 5 | 6 | public TestEnum getEnumValue() { 7 | return e; 8 | } 9 | 10 | public void setEnumValue(TestEnum e) { 11 | this.e = e; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithEnumRefProperty.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class ModelWithEnumRefProperty { 6 | private TestEnum a; 7 | private TestEnum b; 8 | 9 | @Schema(enumAsRef = true) 10 | public TestSecondEnum c; 11 | 12 | public TestSecondEnum d; 13 | 14 | @Schema(enumAsRef = true) 15 | public TestEnum getA() { 16 | return a; 17 | } 18 | 19 | public void setA(TestEnum e) { 20 | this.a = a; 21 | } 22 | 23 | @Schema(enumAsRef = true) 24 | public TestEnum getB() { 25 | return b; 26 | } 27 | 28 | public void setB(TestEnum b) { 29 | this.b = b; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithFormattedStrings.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import java.net.URI; 4 | import java.net.URL; 5 | import java.util.Date; 6 | import java.util.UUID; 7 | 8 | public class ModelWithFormattedStrings { 9 | 10 | public UUID uuid; 11 | public URI uri; 12 | public URL url; 13 | public Date date; 14 | public byte aByte; 15 | public Byte aByteObject; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithJacksonEnumField.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | /** 4 | * Class of different enums for testing schema model 5 | */ 6 | public class ModelWithJacksonEnumField { 7 | public JacksonPropertyEnum firstEnumValue; 8 | public JacksonValueEnum secondEnumValue; 9 | public JacksonIntegerValueEnum thirdEnumValue; 10 | public JacksonValueFieldEnum fourthEnumValue; 11 | public JacksonIntegerValueFieldEnum fifthEnumValue; 12 | public JacksonValuePrivateEnum sixthEnumValue; 13 | } 14 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithJaxBDefaultValues.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import javax.xml.bind.annotation.XmlElement; 4 | import javax.xml.bind.annotation.XmlRootElement; 5 | 6 | @XmlRootElement 7 | public class ModelWithJaxBDefaultValues { 8 | @XmlElement(defaultValue = "Tony") 9 | public String name; 10 | 11 | @XmlElement(defaultValue = "100") 12 | public Integer age; 13 | 14 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithModelPropertyOverrides.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.ArraySchema; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | 6 | public class ModelWithModelPropertyOverrides { 7 | @ArraySchema(schema = @Schema(implementation = Children.class)) 8 | private String children; 9 | 10 | public String getChildren() { 11 | return children; 12 | } 13 | 14 | public void setChildren(String children) { 15 | this.children = children; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithNumbers.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import java.math.BigDecimal; 4 | import java.math.BigInteger; 5 | 6 | public class ModelWithNumbers { 7 | public short shortPrimitive; 8 | public Short shortObject; 9 | public int intPrimitive; 10 | public Integer intObject; 11 | public long longPrimitive; 12 | public Long longObject; 13 | public float floatPrimitive; 14 | public Float floatObject; 15 | public double doublePrimitive; 16 | public Double doubleObject; 17 | public BigInteger bigInteger; 18 | public BigDecimal bigDecimal; 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithOffset.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class ModelWithOffset { 6 | public String id; 7 | 8 | @Schema(implementation = java.time.OffsetDateTime.class) 9 | public String offset; 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ModelWithPrimitiveArray.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | public class ModelWithPrimitiveArray { 4 | public int[] intArray; 5 | 6 | private long[] longArray; 7 | 8 | public long[] getLongArray() { 9 | return longArray; 10 | } 11 | 12 | public void setLongArray(long[] longArray) { 13 | this.longArray = longArray; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ReadOnlyFields.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class ReadOnlyFields { 6 | @Schema(accessMode = Schema.AccessMode.READ_ONLY) 7 | public Long id; 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/ReadOnlyModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class ReadOnlyModel { 6 | private Integer id; 7 | private Integer readWriteId; 8 | 9 | @Schema(accessMode = Schema.AccessMode.READ_ONLY) 10 | public Integer getId() { 11 | return id; 12 | } 13 | 14 | public void setId(Integer id) { 15 | this.id = id; 16 | } 17 | 18 | @Schema(accessMode = Schema.AccessMode.READ_WRITE) 19 | public Integer getReadWriteId() { 20 | return readWriteId; 21 | } 22 | 23 | public void setReadWriteId(Integer readWriteId) { 24 | this.readWriteId = readWriteId; 25 | } 26 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/RequiredRefFieldModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | import javax.xml.bind.annotation.XmlElement; 6 | import javax.xml.bind.annotation.XmlRootElement; 7 | 8 | @XmlRootElement 9 | public class RequiredRefFieldModel { 10 | 11 | @XmlElement(name = "a") 12 | @Schema(required = true) 13 | public String getA() { 14 | return "aaa"; 15 | } 16 | 17 | @XmlElement(name = "b") 18 | @Schema(required = true) 19 | public B getB() { 20 | return null; 21 | } 22 | 23 | static class B { 24 | public String foo; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/SpecialOrderItem.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | public class SpecialOrderItem { 4 | public String name; 5 | public Long id; 6 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/TestEnum.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import javax.xml.bind.annotation.XmlEnum; 4 | import javax.xml.bind.annotation.XmlEnumValue; 5 | import javax.xml.bind.annotation.XmlType; 6 | 7 | @XmlType 8 | @XmlEnum(String.class) 9 | public enum TestEnum { 10 | @XmlEnumValue("PRIVATE") PRIVATE, 11 | @XmlEnumValue("PUBLIC") PUBLIC, 12 | @XmlEnumValue("SYSTEM") SYSTEM, 13 | @XmlEnumValue("INVITE_ONLY") INVITE_ONLY; 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/TestSecondEnum.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import javax.xml.bind.annotation.XmlEnum; 4 | import javax.xml.bind.annotation.XmlEnumValue; 5 | import javax.xml.bind.annotation.XmlType; 6 | 7 | @XmlType 8 | @XmlEnum(String.class) 9 | public enum TestSecondEnum { 10 | @XmlEnumValue("A_PRIVATE") A_PRIVATE, 11 | @XmlEnumValue("A_PUBLIC") A_PUBLIC, 12 | @XmlEnumValue("A_SYSTEM") A_SYSTEM, 13 | @XmlEnumValue("A_INVITE_ONLY") A_INVITE_ONLY; 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/XmlFirstRequiredFieldModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | import javax.xml.bind.annotation.XmlAccessType; 6 | import javax.xml.bind.annotation.XmlAccessorType; 7 | import javax.xml.bind.annotation.XmlElement; 8 | import javax.xml.bind.annotation.XmlRootElement; 9 | 10 | @XmlRootElement 11 | @XmlAccessorType(XmlAccessType.FIELD) 12 | @Schema(name = "aaa") 13 | public class XmlFirstRequiredFieldModel { 14 | @XmlElement(name = "a") 15 | @Schema(description = "bla", required = true) 16 | public String getA() { 17 | return "aaa"; 18 | } 19 | 20 | public String getC() { 21 | return "kkk"; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/AbstractBaseModelWithSubTypes.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.composition; 2 | 3 | import com.fasterxml.jackson.annotation.JsonSubTypes; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | 6 | @JsonSubTypes({@JsonSubTypes.Type(value = Thing1.class, name = "thing3"), @JsonSubTypes.Type(value = Thing2.class, name = "thing2")}) 7 | @Schema(description = "I am an Abstract Base Model with Sub-Types", discriminatorProperty = "_type") 8 | abstract public class AbstractBaseModelWithSubTypes { 9 | 10 | @Schema(description = "This value is used as a discriminator for serialization") 11 | public String _type; 12 | @Schema(description = "An arbitrary field") 13 | public String a; 14 | @Schema(description = "An arbitrary field") 15 | public String b; 16 | } 17 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/AbstractBaseModelWithoutFields.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.composition; 2 | 3 | import com.fasterxml.jackson.annotation.JsonSubTypes; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | 6 | @JsonSubTypes({@JsonSubTypes.Type(value = Thing3.class, name = "thing3")}) 7 | @Schema(description = "I am an Abstract Base Model without any declared fields and with Sub-Types") 8 | public abstract class AbstractBaseModelWithoutFields { 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/AbstractModelWithApiModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.composition; 2 | 3 | import com.fasterxml.jackson.annotation.JsonSubTypes; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | 6 | @Schema(name = "MyProperty") 7 | @JsonSubTypes({@JsonSubTypes.Type(value = ModelWithUrlProperty.class), @JsonSubTypes.Type(value = ModelWithValueProperty.class)}) 8 | public abstract class AbstractModelWithApiModel { 9 | 10 | private final String type; 11 | 12 | protected AbstractModelWithApiModel(String type) { 13 | this.type = type; 14 | } 15 | 16 | public String getType() { 17 | return type; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/Animal.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.composition; 2 | 3 | import com.fasterxml.jackson.annotation.JsonSubTypes; 4 | import com.fasterxml.jackson.annotation.JsonSubTypes.Type; 5 | import com.fasterxml.jackson.annotation.JsonTypeInfo; 6 | 7 | @JsonTypeInfo( 8 | use = JsonTypeInfo.Id.NAME, 9 | include = JsonTypeInfo.As.EXTERNAL_PROPERTY, 10 | property = "type") 11 | @JsonSubTypes({ 12 | @Type(value = Human.class, name = "human"), 13 | @Type(value = Pet.class, name = "pet") 14 | }) 15 | public interface Animal { 16 | String getName(); 17 | 18 | void setName(String name); 19 | 20 | String getType(); 21 | 22 | void setType(String type); 23 | } 24 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/ModelWithFieldWithSubTypes.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.composition; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema(description = "Class that has a field that is the AbstractBaseModelWithSubTypes") 6 | public class ModelWithFieldWithSubTypes { 7 | 8 | @Schema(description = "Contained field with sub-types") 9 | AbstractBaseModelWithSubTypes z; 10 | 11 | public AbstractBaseModelWithSubTypes getZ() { 12 | return z; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/ModelWithUrlProperty.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.composition; 2 | 3 | import java.net.MalformedURLException; 4 | import java.net.URL; 5 | 6 | public class ModelWithUrlProperty extends AbstractModelWithApiModel { 7 | 8 | private final URL url; 9 | 10 | public ModelWithUrlProperty(String type, String url) { 11 | super(type); 12 | try { 13 | this.url = new URL(url); 14 | } catch (MalformedURLException e) { 15 | throw new IllegalArgumentException(e); 16 | } 17 | } 18 | 19 | public URL getUrl() { 20 | return url; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/ModelWithValueProperty.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.composition; 2 | 3 | public class ModelWithValueProperty extends AbstractModelWithApiModel { 4 | 5 | private final String value; 6 | 7 | public ModelWithValueProperty(String type, String value) { 8 | super(type); 9 | this.value = value; 10 | } 11 | 12 | public String getValue() { 13 | return value; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/Pet.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.composition; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public interface Pet extends Animal { 6 | @Schema(required = true, description = "The pet type") 7 | String getType(); 8 | 9 | void setType(String type); 10 | 11 | @Schema(required = true, description = "The name of the pet") 12 | String getName(); 13 | 14 | void setName(String name); 15 | 16 | @Schema(required = true) 17 | Boolean getIsDomestic(); 18 | 19 | void setIsDomestic(Boolean isDomestic); 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/Thing1.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.composition; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema(description = "Shake hands with Thing1", allOf = {AbstractBaseModelWithSubTypes.class}) 6 | public class Thing1 extends AbstractBaseModelWithSubTypes { 7 | 8 | @Schema(description = "Override the abstract a") 9 | public String a; 10 | @Schema(description = "Thing1 has an additional field") 11 | public int x; 12 | } 13 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/Thing2.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.composition; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema(description = "and Thing2", allOf = {AbstractBaseModelWithSubTypes.class}) 6 | public class Thing2 extends AbstractBaseModelWithSubTypes { 7 | 8 | @Schema(description = "Override the abstract a") 9 | public String a; 10 | @Schema(description = "Thing2 has an additional field") 11 | public String s; 12 | } 13 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/composition/Thing3.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.composition; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema(description = "Thing3", allOf = {AbstractBaseModelWithoutFields.class}) 6 | public class Thing3 extends AbstractBaseModelWithoutFields { 7 | 8 | @Schema(description = "Additional field a") 9 | String a; 10 | @Schema(description = "Additional field x") 11 | int x; 12 | 13 | public String getA() { 14 | return a; 15 | } 16 | 17 | public void setA(String a) { 18 | this.a = a; 19 | } 20 | 21 | public int getX() { 22 | return x; 23 | } 24 | 25 | public void setX(int x) { 26 | this.x = x; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/xmltest/NestedModelWithJAXBAnnotations.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.xmltest; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | 5 | import javax.xml.bind.annotation.XmlAttribute; 6 | import javax.xml.bind.annotation.XmlElement; 7 | import javax.xml.bind.annotation.XmlElementWrapper; 8 | import javax.xml.bind.annotation.XmlRootElement; 9 | import java.util.List; 10 | 11 | @XmlRootElement(name = "RootName") 12 | public class NestedModelWithJAXBAnnotations { 13 | @XmlAttribute 14 | public String id; 15 | 16 | @XmlElement(name = "named") 17 | public String name; 18 | 19 | @XmlElement(name = "SubName") 20 | public SubModelWithJAXBAnnotations subName; 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/xmltest/SubModelWithJAXBAnnotations.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.oas.models.xmltest; 2 | 3 | import javax.xml.bind.annotation.*; 4 | 5 | @XmlAccessorType(XmlAccessType.FIELD) 6 | @XmlType(name = "SubType", propOrder = { 7 | "id", 8 | "name" 9 | }) 10 | public class SubModelWithJAXBAnnotations { 11 | @XmlAttribute 12 | public String id; 13 | 14 | @XmlElement 15 | public String name; 16 | } 17 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/oas/models/xmltest/package-info.java: -------------------------------------------------------------------------------- 1 | @javax.xml.bind.annotation.XmlSchema( 2 | namespace = "https://www.openapis.org/test/nested", 3 | elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED 4 | ) 5 | package io.swagger.v3.core.oas.models.xmltest; 6 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/InnerType.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | public class InnerType { 4 | public int foo; 5 | public String name; 6 | 7 | public String getName() { 8 | return name; 9 | } 10 | 11 | public void setName(String name) { 12 | this.name = name; 13 | } 14 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/InnerTypeRequired.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class InnerTypeRequired { 6 | public int foo; 7 | @Schema(required = true) 8 | public String name; 9 | 10 | public String getName() { 11 | return name; 12 | } 13 | 14 | public void setName(String name) { 15 | this.name = name; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/Issue4290.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class Issue4290 { 6 | @Schema(description = "A string, a number or a boolean", anyOf = { String.class, Number.class, Boolean.class }) 7 | public Object value; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/JacksonUnwrappedRequiredProperty.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | import com.fasterxml.jackson.annotation.JsonUnwrapped; 4 | 5 | public class JacksonUnwrappedRequiredProperty { 6 | @JsonUnwrapped private final InnerTypeRequired innerType; 7 | 8 | public JacksonUnwrappedRequiredProperty(InnerTypeRequired innerType) { 9 | this.innerType = innerType; 10 | } 11 | 12 | public InnerTypeRequired getInnerType() { 13 | return innerType; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/MyThing.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | import java.util.HashSet; 6 | import java.util.Set; 7 | 8 | @Schema(description = "Thing") 9 | public class MyThing { 10 | private final Set otherThings; 11 | 12 | public MyThing() { 13 | otherThings = new HashSet<>(); 14 | } 15 | 16 | @Schema(description = "Other related things") 17 | public Set getOtherThings() { 18 | return otherThings; 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestArrayType.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | import io.swagger.v3.oas.annotations.media.ArraySchema; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | public class TestArrayType { 9 | 10 | private Integer id; 11 | 12 | @ArraySchema(maxItems = 10) 13 | private List names; 14 | 15 | public Integer getId() { 16 | return id; 17 | } 18 | 19 | public void setId(Integer id) { 20 | this.id = id; 21 | } 22 | 23 | public List getNames() { 24 | return names; 25 | } 26 | 27 | public void setNames(List names) { 28 | this.names = names; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObject2972.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | import java.util.Map; 4 | 5 | public class TestObject2972 { 6 | 7 | public Map myField1; 8 | public Map myField2; 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObject3699.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | import java.util.List; 4 | 5 | @com.fasterxml.jackson.annotation.JsonTypeInfo( 6 | use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, 7 | include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.WRAPPER_OBJECT) 8 | @com.fasterxml.jackson.annotation.JsonTypeName("CustomName") 9 | public class TestObject3699 { 10 | public String bar; 11 | public List foo; 12 | } 13 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObject4715.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | public class TestObject4715 { 4 | 5 | private String foo; 6 | 7 | private String bar; 8 | 9 | private Integer id; 10 | 11 | public String getFoo() { 12 | return foo; 13 | } 14 | 15 | public void setFoo(String foo) { 16 | this.foo = foo; 17 | } 18 | 19 | public String getBar() { 20 | return bar; 21 | } 22 | 23 | public void setBar(String bar) { 24 | this.bar = bar; 25 | } 26 | 27 | public Integer getId() { 28 | return id; 29 | } 30 | 31 | public void setId(Integer id) { 32 | this.id = id; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/TestObjectTicket4247.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class TestObjectTicket4247 { 6 | 7 | @Schema( 8 | oneOf = { String.class, Number.class } 9 | ) 10 | public Object value; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/Ticket2862Model.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | @com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.WRAPPER_OBJECT) 4 | @com.fasterxml.jackson.annotation.JsonSubTypes({ 5 | @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = Ticket2862ModelImpl.class)}) 6 | public interface Ticket2862Model {} 7 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/Ticket2862ModelImpl.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | public enum Ticket2862ModelImpl implements Ticket2862Model { 4 | VALUE1, 5 | VALUE2 6 | } 7 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/Ticket2884Model.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | @com.fasterxml.jackson.annotation.JsonTypeInfo( 4 | use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, 5 | include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.WRAPPER_OBJECT) 6 | public interface Ticket2884Model {} 7 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/resources/Ticket2884ModelClass.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.resources; 2 | 3 | import java.util.List; 4 | 5 | @com.fasterxml.jackson.annotation.JsonTypeInfo( 6 | use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, 7 | include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.WRAPPER_OBJECT) 8 | public class Ticket2884ModelClass { 9 | 10 | public String bar; 11 | public List foo; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/AnnotatedArray.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model; 2 | 3 | import io.swagger.v3.oas.annotations.media.ArraySchema; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | 6 | @ArraySchema( 7 | maxContains = 10, 8 | minContains = 1, 9 | contains = @Schema( 10 | types = { "string" } 11 | ), 12 | unevaluatedItems = @Schema( 13 | types = { "number" } 14 | ), 15 | schema = @Schema( 16 | types = { "string" } 17 | ), 18 | prefixItems = { 19 | @Schema( 20 | types = { "string" } 21 | ) 22 | } 23 | ) 24 | public class AnnotatedArray { 25 | } 26 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/Client.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model; 2 | 3 | public class Client { 4 | 5 | private String name; 6 | private int creditCard; 7 | 8 | public String getName() { 9 | return name; 10 | } 11 | 12 | public void setName(String name) { 13 | this.name = name; 14 | } 15 | 16 | public int getCreditCard() { 17 | return creditCard; 18 | } 19 | 20 | public void setCreditCard(int creditCard) { 21 | this.creditCard = creditCard; 22 | } 23 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/CreditCard.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model; 2 | 3 | public class CreditCard { 4 | 5 | private String billingAddress; 6 | 7 | public String getBillingAddress() { 8 | return billingAddress; 9 | } 10 | 11 | public void setBillingAddress(String billingAddress) { 12 | this.billingAddress = billingAddress; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/ListOfStringsBeanParam.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model; 2 | 3 | import javax.ws.rs.QueryParam; 4 | import java.util.List; 5 | 6 | public class ListOfStringsBeanParam { 7 | @QueryParam(value = "listOfStrings") 8 | private List list; 9 | 10 | public List getList() { 11 | return list; 12 | } 13 | 14 | public void setList(List list) { 15 | this.list = list; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/MultipleBaseBean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model; 2 | 3 | @io.swagger.v3.oas.annotations.media.Schema( 4 | description = "MultipleBaseBean", 5 | subTypes = { MultipleSub1Bean.class, MultipleSub2Bean.class } 6 | ) 7 | public class MultipleBaseBean { 8 | public String beanType; 9 | public int a; 10 | public String b; 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/MultipleSub1Bean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model; 2 | 3 | @io.swagger.v3.oas.annotations.media.Schema( 4 | description = "MultipleSub1Bean" 5 | ) 6 | public class MultipleSub1Bean extends MultipleBaseBean { 7 | public int c; 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/MultipleSub2Bean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model; 2 | 3 | @io.swagger.v3.oas.annotations.media.Schema( 4 | description = "MultipleSub2Bean" 5 | ) 6 | public class MultipleSub2Bean extends MultipleBaseBean { 7 | public int d; 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/NotFoundModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model; 2 | 3 | public class NotFoundModel { 4 | int code; 5 | String message; 6 | 7 | public NotFoundModel() { 8 | } 9 | 10 | public NotFoundModel(int code, String message) { 11 | this.code = code; 12 | this.message = message; 13 | } 14 | 15 | public int getCode() { 16 | return code; 17 | } 18 | 19 | public void setCode(int code) { 20 | this.code = code; 21 | } 22 | 23 | public String getMessage() { 24 | return message; 25 | } 26 | 27 | public void setMessage(String message) { 28 | this.message = message; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/PostalCodeNumberPattern.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | 6 | public class PostalCodeNumberPattern { 7 | 8 | private Object postalCode; 9 | 10 | @Schema( 11 | pattern = "[0-9]{5}(-[0-9]{4})?", 12 | type = "string" 13 | ) 14 | public Object getPostalCode() { 15 | return postalCode; 16 | } 17 | 18 | public void setPostalCode(Object postalCode) { 19 | this.postalCode = postalCode; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/PostalCodePattern.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class PostalCodePattern { 6 | 7 | private Object postalCode; 8 | 9 | @Schema( 10 | pattern = "[A-Z][0-9][A-Z] [0-9][A-Z][0-9]", 11 | type = "string" 12 | ) 13 | public Object getPostalCode() { 14 | return postalCode; 15 | } 16 | 17 | public void setPostalCode(Object postalCode) { 18 | this.postalCode = postalCode; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/Tag.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model; 2 | 3 | import javax.xml.bind.annotation.XmlElement; 4 | import javax.xml.bind.annotation.XmlRootElement; 5 | 6 | @XmlRootElement(name = "Tag") 7 | public class Tag { 8 | private long id; 9 | private String name; 10 | 11 | @XmlElement(name = "id") 12 | public long getId() { 13 | return id; 14 | } 15 | 16 | public void setId(long id) { 17 | this.id = id; 18 | } 19 | 20 | @XmlElement(name = "name") 21 | public String getName() { 22 | return name; 23 | } 24 | 25 | public void setName(String name) { 26 | this.name = name; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/siblings/Category.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model.siblings; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema(description = "parent") 6 | public class Category { 7 | private long id; 8 | 9 | public long getId() { 10 | return id; 11 | } 12 | 13 | public void setId(long id) { 14 | this.id = id; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/resolving/v31/model/siblings/Pet.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.resolving.v31.model.siblings; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class Pet { 6 | private Category category; 7 | 8 | @Schema(description = "child") 9 | public Category getCategory() { 10 | return category; 11 | } 12 | 13 | public void setCategory(Category category) { 14 | this.category = category; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/util/ResourceUtils.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.util; 2 | 3 | import org.apache.commons.io.IOUtils; 4 | 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.nio.charset.StandardCharsets; 8 | 9 | public class ResourceUtils { 10 | 11 | public static String loadClassResource(Class cls, String name) throws IOException { 12 | InputStream in = null; 13 | try { 14 | in = cls.getClassLoader().getResourceAsStream(name); 15 | return IOUtils.toString(in, StandardCharsets.UTF_8); 16 | } finally { 17 | IOUtils.closeQuietly(in); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/util/reflection/resources/IGrandparent.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.util.reflection.resources; 2 | 3 | public interface IGrandparent { 4 | String parametrizedMethod5(T arg); 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/util/reflection/resources/IParent.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.util.reflection.resources; 2 | 3 | import javax.ws.rs.Path; 4 | 5 | @Path("parentInterfacePath") 6 | @IndirectAnnotation 7 | public interface IParent extends IGrandparent { 8 | 9 | public String parametrizedMethod2(T arg); 10 | 11 | @Override 12 | String parametrizedMethod5(T arg); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/util/reflection/resources/IndirectAnnotation.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.util.reflection.resources; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Target({ElementType.METHOD, ElementType.TYPE}) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | @interface IndirectAnnotation { 11 | 12 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/java/io/swagger/v3/core/util/reflection/resources/ObjectWithManyFields.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.core.util.reflection.resources; 2 | 3 | public class ObjectWithManyFields { 4 | 5 | public String a; 6 | public boolean d; 7 | public Integer c; 8 | public Object b; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/Cat.json: -------------------------------------------------------------------------------- 1 | { 2 | "Cat": { 3 | "required": [ 4 | "isDomestic", 5 | "name", 6 | "type" 7 | ], 8 | "type": "object", 9 | "properties": { 10 | "clawCount": { 11 | "type": "integer", 12 | "format": "int32" 13 | }, 14 | "type": { 15 | "type": "string", 16 | "description": "The pet type" 17 | }, 18 | "name": { 19 | "type": "string", 20 | "description": "The name of the pet" 21 | }, 22 | "isDomestic": { 23 | "type": "boolean" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/GuavaTestModel.json: -------------------------------------------------------------------------------- 1 | { 2 | "GuavaModel": { 3 | "type": "object", 4 | "properties": { 5 | "name": { 6 | "type": "string" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/Human.json: -------------------------------------------------------------------------------- 1 | { 2 | "Human": { 3 | "type": "object", 4 | "properties": { 5 | "name": { 6 | "type": "string" 7 | }, 8 | "type": { 9 | "type": "string" 10 | }, 11 | "firstName": { 12 | "type": "string" 13 | }, 14 | "lastName": { 15 | "type": "string" 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/JodaDateTimeModel.json: -------------------------------------------------------------------------------- 1 | { 2 | "JodaDateTimeModel": { 3 | "type": "object", 4 | "properties": { 5 | "createdAt": { 6 | "type": "string", 7 | "format": "date-time" 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/ModelWithFormattedStrings.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "uuid": { 5 | "type": "string", 6 | "format": "uuid" 7 | }, 8 | "uri": { 9 | "type": "string", 10 | "format": "uri" 11 | }, 12 | "url": { 13 | "type": "string", 14 | "format": "url" 15 | }, 16 | "date": { 17 | "type": "string", 18 | "format": "date-time" 19 | }, 20 | "aByte": { 21 | "type": "string", 22 | "format": "byte" 23 | }, 24 | "aByteObject": { 25 | "type": "string", 26 | "format": "byte" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/Pet.json: -------------------------------------------------------------------------------- 1 | { 2 | "Pet": { 3 | "required": [ 4 | "isDomestic", 5 | "name", 6 | "type" 7 | ], 8 | "type": "object", 9 | "properties": { 10 | "type": { 11 | "type": "string", 12 | "description": "The pet type" 13 | }, 14 | "name": { 15 | "type": "string", 16 | "description": "The name of the pet" 17 | }, 18 | "isDomestic": { 19 | "type": "boolean" 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/json-schema-validation/array.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "array", 3 | "items": { 4 | "type": "string" 5 | }, 6 | "minItems": 1, 7 | "maxItems": 10, 8 | "uniqueItems": true 9 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/json-schema-validation/map.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "additionalProperties": { 4 | "type": "string" 5 | }, 6 | "minProperties": 1, 7 | "maxProperties": 10 8 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/specFiles/3.1.0/issue-4737-3.1.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.1.0 2 | info: 3 | title: OpenAPI definition 4 | version: v0 5 | servers: 6 | - url: http://localhost 7 | description: Generated server url 8 | paths: {} 9 | components: 10 | schemas: 11 | RequestDto: 12 | properties: 13 | personalNumber: 14 | type: string 15 | webhooks: 16 | newPet: 17 | post: 18 | requestBody: 19 | description: Information about a new pet in the system 20 | content: 21 | application/json: 22 | schema: 23 | $ref: "#/components/schemas/RequestDto" 24 | description: Webhook Pet 25 | responses: 26 | '200': 27 | description: >- 28 | Return a 200 status to indicate that the data was received 29 | successfully -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/specFiles/deprecatedoperationmodel.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.1", 3 | "tags" : [ { 4 | "name" : "Test Api" 5 | } ], 6 | "paths" : { 7 | "/test" : { 8 | "get" : { 9 | "tags" : [ "Test Api" ], 10 | "operationId" : "getA", 11 | "parameters" : [ ], 12 | "responses" : { 13 | "200" : { 14 | "description" : "successful operation", 15 | "schema" : { 16 | "$ref" : "#/definitions/EmptyModel" 17 | }, 18 | "headers" : { } 19 | } 20 | }, 21 | "deprecated" : true 22 | } 23 | } 24 | }, 25 | "components" : { 26 | "EmptyModel" : { 27 | "type" : "object" 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/specFiles/null-in-schema-example.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.2 2 | info: 3 | title: VirtServer support for null examples 4 | version: 1.0.0 5 | paths: 6 | 7 | /object-with-null-in-schema-example: 8 | get: 9 | description: 'Response should be `{..., "d": null}`' 10 | responses: 11 | '200': 12 | description: 'Should be `{..., "d": null}`' 13 | content: 14 | application/json: 15 | schema: 16 | $ref: "#/components/schemas/ObjectWithNullInSchemaExample" 17 | 18 | components: 19 | schemas: 20 | ObjectWithNullInSchemaExample: 21 | type: object 22 | example: 23 | a: 5 24 | b: test 25 | c: true 26 | d: null 27 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/specFiles/securitySchemaWithExtension.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "oauth2", 3 | "flows": { 4 | "implicit": { 5 | "authorizationUrl": "http://petstore.swagger.io/oauth/dialog", 6 | "scopes": { 7 | "write:pets": "modify pets in your account", 8 | "read:pets": "read your pets" 9 | } 10 | } 11 | }, 12 | "x-custom": { 13 | "key-string": "value-one" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-core/src/test/resources/specFiles/swos-126.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.0 2 | info: 3 | title: ExampleBuilder and date-time examples 4 | version: 0.0.0 5 | paths: {} 6 | 7 | components: 8 | schemas: 9 | MyModel: 10 | type: object 11 | properties: 12 | date: 13 | type: string 14 | format: date 15 | example: '2019-08-05' 16 | dateTime: 17 | type: string 18 | format: date-time 19 | example: '2019-08-05T12:34:56Z' -------------------------------------------------------------------------------- /modules/swagger-eclipse-transformer-maven-plugin/README.md: -------------------------------------------------------------------------------- 1 | Adapted from https://github.com/eclipse/transformer/blob/main/org.eclipse.transformer.maven 2 | not to add the transformed JAR as an attached artifact to the project. 3 | 4 | To be replaced with Eclipse original Transformer plugin when/if optional attachment is supported. 5 | 6 | 7 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/gradle.properties: -------------------------------------------------------------------------------- 1 | version=2.2.33-SNAPSHOT 2 | jettyVersion=9.4.53.v20231009 3 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-core/852ed24f50f7b5f3cf9d162346362cdff25acc1f/modules/swagger-gradle-plugin/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip 4 | networkTimeout=10000 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'swagger-gradle-plugin' 2 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/EmptyPetResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore; 2 | 3 | /** 4 | * An Empty PetResource Class 5 | */ 6 | public class EmptyPetResource { 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/example/SubscriptionResponse.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore.example; 2 | 3 | public class SubscriptionResponse { 4 | public String subscriptionId; 5 | } -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/NotAnnotatedSameNameOperationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore.operation; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | 6 | /** 7 | * Resource With a Default Operation without Annotation 8 | */ 9 | public class NotAnnotatedSameNameOperationResource { 10 | @Path("/notannotatedoperation") 11 | @GET 12 | public String getUser() { 13 | return new String(); 14 | } 15 | 16 | @Path("/notannotatedoperationduplicated") 17 | @GET 18 | public String getUser(final String id) { 19 | return new String(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/OperationWithoutAnnotationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore.operation; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | 6 | /** 7 | * Resource With a Default Operation without Annotation 8 | */ 9 | public class OperationWithoutAnnotationResource { 10 | @Path("/operationwithouannotation") 11 | @GET 12 | public String getUser() { 13 | return new String(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/operation/SubResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore.operation; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | import io.swagger.v3.plugins.gradle.resources.model.Pet; 5 | 6 | import javax.ws.rs.core.Response; 7 | 8 | /** 9 | * SubResource 10 | */ 11 | 12 | public class SubResource implements InterfaceResource { 13 | @Override 14 | @Operation(summary = "Find pet by ID Operation in SubResource", 15 | description = "Returns a pet in SubResource" 16 | ) 17 | public Response getPetById(final Long petId) { 18 | return Response.ok().entity(new Pet()).build(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/MultipleNotAnnotatedParameter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore.parameter; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.POST; 6 | import javax.ws.rs.Path; 7 | 8 | /** 9 | * Class with a multiple not annotated parameter. 10 | */ 11 | public class MultipleNotAnnotatedParameter { 12 | @POST 13 | @Path("/multiplenoannotatedparameter") 14 | @Operation(operationId = "create User") 15 | public void createUser(final String id, final String name) { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/SingleJaxRSAnnotatedParameter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore.parameter; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | import io.swagger.v3.plugins.gradle.resources.model.User; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.QueryParam; 9 | 10 | /** 11 | * Class with a single parameter annotated with jaxrs. 12 | */ 13 | public class SingleJaxRSAnnotatedParameter { 14 | @GET 15 | @Path("/singlejaxrsannotatedparameter") 16 | @Operation(operationId = "create User") 17 | public User findUser(@QueryParam("id") final String id) { 18 | return new User(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/parameter/SingleNotAnnotatedParameter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore.parameter; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | import io.swagger.v3.plugins.gradle.resources.model.User; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | 9 | /** 10 | * Class with a single not annotated parameter. 11 | */ 12 | public class SingleNotAnnotatedParameter { 13 | @GET 14 | @Path("/singlenoannotatedparameter") 15 | @Operation(operationId = "create User") 16 | public User findUser(final String id) { 17 | return new User(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/responses/NoResponseResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore.responses; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | import io.swagger.v3.plugins.gradle.resources.exception.NotFoundException; 5 | import io.swagger.v3.plugins.gradle.resources.model.User; 6 | 7 | import javax.ws.rs.GET; 8 | import javax.ws.rs.Path; 9 | 10 | /** 11 | * Resource with a Response at Method Level 12 | */ 13 | public class NoResponseResource { 14 | @GET 15 | @Path("/noresponse") 16 | @Operation(summary = "Find pets", 17 | description = "Returns the Pets") 18 | public User getPets() throws NotFoundException { 19 | return new User(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/tags/TagClassResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore.tags; 2 | 3 | import io.swagger.v3.oas.annotations.ExternalDocumentation; 4 | import io.swagger.v3.oas.annotations.tags.Tag; 5 | 6 | /** 7 | * Class with Tag Annotations at Class level 8 | */ 9 | @Tag(name = "Second Tag") 10 | @Tag(name = "Fourth Tag Full", description = "desc class", externalDocs = @ExternalDocumentation(description = "docs desc class")) 11 | @Tag(name = "Fifth Tag Full", description = "desc class", externalDocs = @ExternalDocumentation(description = "docs desc class")) 12 | @Tag(name = "Sixth Tag") 13 | public class TagClassResource { 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/tags/TagMethodResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore.tags; 2 | 3 | import io.swagger.v3.oas.annotations.ExternalDocumentation; 4 | import io.swagger.v3.oas.annotations.tags.Tag; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.core.Response; 9 | 10 | public class TagMethodResource { 11 | @GET 12 | @Path("/tagsinmethod") 13 | @Tag(name = "Third Tag") 14 | @Tag(name = "Second Tag") 15 | @Tag(name = "Fourth Tag Full", description = "desc", externalDocs = @ExternalDocumentation(description = "docs desc")) 16 | public Response getTags() { 17 | return Response.ok().entity("ok").build(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/tags/TagOpenAPIDefinitionResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore.tags; 2 | 3 | import io.swagger.v3.oas.annotations.OpenAPIDefinition; 4 | import io.swagger.v3.oas.annotations.tags.Tag; 5 | 6 | /** 7 | * Tag in the OpenAPIDefinition annotation 8 | */ 9 | @OpenAPIDefinition(tags = { 10 | @Tag(name = "Definition First Tag"), 11 | @Tag(name = "Definition Second Tag full", description = "desc definition") 12 | }) 13 | public class TagOpenAPIDefinitionResource { 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/petstore/tags/TagOperationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.petstore.tags; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.core.Response; 8 | 9 | /** 10 | * Resource with a Tag at Operation Level 11 | */ 12 | public class TagOperationResource { 13 | 14 | @GET 15 | @Path("/tagoperation") 16 | @Operation(tags = {"Example Tag", "Second Tag"}) 17 | public Response getTags() { 18 | return Response.ok().entity("ok").build(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/QueryResultBean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.resources; 2 | 3 | import javax.ws.rs.QueryParam; 4 | 5 | public class QueryResultBean { 6 | @QueryParam("skip") 7 | private Integer skip; 8 | 9 | @QueryParam("limit") 10 | private Integer limit; 11 | 12 | public Integer getSkip() { 13 | return skip; 14 | } 15 | 16 | public void setSkip(Integer skip) { 17 | this.skip = skip; 18 | } 19 | 20 | public Integer getLimit() { 21 | return limit; 22 | } 23 | 24 | public void setLimit(Integer limit) { 25 | this.limit = limit; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/exception/ApiException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.resources.exception; 2 | 3 | public class ApiException extends Exception { 4 | private int code; 5 | 6 | public ApiException(int code, String msg) { 7 | super(msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/exception/NotFoundException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.resources.exception; 2 | 3 | public class NotFoundException extends ApiException { 4 | private int code; 5 | 6 | public NotFoundException(int code, String msg) { 7 | super(code, msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/ListOfStringsBeanParam.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.resources.model; 2 | 3 | import javax.ws.rs.QueryParam; 4 | import java.util.List; 5 | 6 | public class ListOfStringsBeanParam { 7 | @QueryParam(value = "listOfStrings") 8 | private List list; 9 | 10 | public List getList() { 11 | return list; 12 | } 13 | 14 | public void setList(List list) { 15 | this.list = list; 16 | } 17 | } -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/MultipleBaseBean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.resources.model; 2 | 3 | @io.swagger.v3.oas.annotations.media.Schema( 4 | description = "MultipleBaseBean", 5 | subTypes = { MultipleSub1Bean.class, MultipleSub2Bean.class } 6 | ) 7 | public class MultipleBaseBean { 8 | public String beanType; 9 | public int a; 10 | public String b; 11 | } -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/MultipleSub1Bean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.resources.model; 2 | 3 | @io.swagger.v3.oas.annotations.media.Schema( 4 | description = "MultipleSub1Bean" 5 | ) 6 | public class MultipleSub1Bean extends MultipleBaseBean { 7 | public int c; 8 | } -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/MultipleSub2Bean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.resources.model; 2 | 3 | @io.swagger.v3.oas.annotations.media.Schema( 4 | description = "MultipleSub2Bean" 5 | ) 6 | public class MultipleSub2Bean extends MultipleBaseBean { 7 | public int d; 8 | } -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/NotFoundModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.resources.model; 2 | 3 | public class NotFoundModel { 4 | int code; 5 | String message; 6 | 7 | public NotFoundModel() { 8 | } 9 | 10 | public NotFoundModel(int code, String message) { 11 | this.code = code; 12 | this.message = message; 13 | } 14 | 15 | public int getCode() { 16 | return code; 17 | } 18 | 19 | public void setCode(int code) { 20 | this.code = code; 21 | } 22 | 23 | public String getMessage() { 24 | return message; 25 | } 26 | 27 | public void setMessage(String message) { 28 | this.message = message; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /modules/swagger-gradle-plugin/src/test/java/io/swagger/v3/plugins/gradle/resources/model/Tag.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugins.gradle.resources.model; 2 | 3 | import javax.xml.bind.annotation.XmlElement; 4 | import javax.xml.bind.annotation.XmlRootElement; 5 | 6 | @XmlRootElement(name = "Tag") 7 | public class Tag { 8 | private long id; 9 | private String name; 10 | 11 | @XmlElement(name = "id") 12 | public long getId() { 13 | return id; 14 | } 15 | 16 | public void setId(long id) { 17 | this.id = id; 18 | } 19 | 20 | @XmlElement(name = "name") 21 | public String getName() { 22 | return name; 23 | } 24 | 25 | public void setName(String name) { 26 | this.name = name; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/FileOpenApiConfigurationLoader.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.integration; 2 | 3 | import io.swagger.v3.oas.integration.api.OpenAPIConfiguration; 4 | 5 | import java.io.File; 6 | import java.io.FileInputStream; 7 | import java.io.IOException; 8 | 9 | public class FileOpenApiConfigurationLoader implements StringOpenApiConfigurationLoader { 10 | 11 | @Override 12 | public OpenAPIConfiguration load(String path) throws IOException { 13 | File file = new File(path); 14 | return deserializeConfig(path, readInputStreamToString(new FileInputStream(file))); 15 | } 16 | 17 | @Override 18 | public boolean exists(String path) { 19 | File file = new File(path); 20 | return file.exists(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/IgnoredPackages.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.integration; 2 | 3 | import java.util.HashSet; 4 | import java.util.Set; 5 | 6 | public final class IgnoredPackages { 7 | 8 | public static final Set ignored = new HashSet<>(); 9 | 10 | static { 11 | ignored.add("io.swagger.v3.jaxrs2.integration.resources"); 12 | ignored.add("org.glassfish.jersey"); 13 | ignored.add("org.jboss.resteasy"); 14 | ignored.add("com.sun.jersey"); 15 | ignored.add("com.fasterxml.jackson"); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/IntegrationObjectMapperFactory.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.integration; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | import io.swagger.v3.core.util.ObjectMapperFactory; 5 | 6 | public class IntegrationObjectMapperFactory extends ObjectMapperFactory { 7 | 8 | public static ObjectMapper createJson() { 9 | return ObjectMapperFactory.createJson(); 10 | } 11 | 12 | public static ObjectMapper createJson31() { 13 | return ObjectMapperFactory.createJson31(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/OpenApiConfigurationException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.integration; 2 | 3 | public class OpenApiConfigurationException extends Exception { 4 | 5 | public OpenApiConfigurationException(String message, Throwable cause) { 6 | super(message, cause); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/URLOpenApiConfigurationLoader.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.integration; 2 | 3 | import io.swagger.v3.oas.integration.api.OpenAPIConfiguration; 4 | import io.swagger.v3.oas.integration.api.OpenApiConfigurationLoader; 5 | 6 | import java.io.IOException; 7 | 8 | // TODO 9 | public class URLOpenApiConfigurationLoader implements OpenApiConfigurationLoader { 10 | 11 | @Override 12 | public OpenAPIConfiguration load(String path) throws IOException { 13 | return null; 14 | } 15 | 16 | @Override 17 | public boolean exists(String path) { 18 | return false; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/api/OpenAPIConfigBuilder.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.integration.api; 2 | 3 | public interface OpenAPIConfigBuilder { 4 | OpenAPIConfiguration build(); 5 | } -------------------------------------------------------------------------------- /modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/api/OpenApiContextBuilder.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.integration.api; 2 | 3 | import io.swagger.v3.oas.integration.OpenApiConfigurationException; 4 | 5 | public interface OpenApiContextBuilder { 6 | 7 | OpenApiContext buildContext(boolean init) throws OpenApiConfigurationException; 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/api/OpenApiReader.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.integration.api; 2 | 3 | import io.swagger.v3.oas.models.OpenAPI; 4 | 5 | import java.util.Map; 6 | import java.util.Set; 7 | 8 | public interface OpenApiReader { 9 | 10 | void setConfiguration(OpenAPIConfiguration openApiConfiguration); 11 | 12 | OpenAPI read(Set> classes, Map resources); 13 | } 14 | -------------------------------------------------------------------------------- /modules/swagger-integration/src/main/java/io/swagger/v3/oas/integration/api/OpenApiScanner.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.integration.api; 2 | 3 | import java.util.Map; 4 | import java.util.Set; 5 | 6 | public interface OpenApiScanner { 7 | 8 | void setConfiguration(OpenAPIConfiguration openApiConfiguration); 9 | 10 | Set> classes(); 11 | 12 | Map resources(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/resources/JavaRecordResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.java17.resources; 2 | 3 | public record JavaRecordResource( 4 | @io.swagger.v3.oas.annotations.media.Schema(description = "Testing of Java Record Processing") String test, 5 | boolean isLatest, 6 | String id, 7 | Integer age 8 | ) { 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-java17-support/src/test/java/io/swagger/v3/java17/resources/JavaRecordWithPathResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.java17.resources; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.POST; 6 | import javax.ws.rs.Path; 7 | 8 | @Path("sample") 9 | public record JavaRecordWithPathResource() { 10 | 11 | @POST 12 | @Path("/1") 13 | @Operation(description = "description 1", operationId = "id 1") 14 | public void postExample(){ 15 | 16 | } 17 | 18 | @POST 19 | @Path("/2") 20 | @Operation(description = "description 2", operationId = "id 2") 21 | public void postExample2(){ 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2-servlet-initializer-v2/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer: -------------------------------------------------------------------------------- 1 | io.swagger.v3.jaxrs2.integration.servlet.SwaggerServletInitializer 2 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2-servlet-initializer/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer: -------------------------------------------------------------------------------- 1 | io.swagger.v3.jaxrs2.integration.SwaggerServletInitializer -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/ResolvedParameter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2; 2 | 3 | import io.swagger.v3.oas.models.parameters.Parameter; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | public class ResolvedParameter { 9 | public List parameters = new ArrayList<>(); 10 | public Parameter requestBody; 11 | public List formParameters = new ArrayList<>(); 12 | } 13 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/api/JaxrsOpenApiScanner.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.integration.api; 2 | 3 | import io.swagger.v3.oas.integration.api.OpenApiScanner; 4 | 5 | import javax.ws.rs.core.Application; 6 | 7 | public interface JaxrsOpenApiScanner extends OpenApiScanner { 8 | 9 | void setApplication(Application application); 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/api/WebOpenApiContext.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.integration.api; 2 | 3 | import io.swagger.v3.oas.integration.api.OpenApiContext; 4 | 5 | import javax.servlet.ServletConfig; 6 | import javax.servlet.ServletContext; 7 | 8 | public interface WebOpenApiContext extends OpenApiContext { 9 | 10 | ServletContext getServletContext(); 11 | 12 | ServletConfig getServletConfig(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/main/resources/META-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/com/my/project/resources/ResourceInPackageA.java: -------------------------------------------------------------------------------- 1 | package com.my.project.resources; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | import io.swagger.v3.oas.annotations.Parameter; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import java.util.ArrayList; 9 | 10 | @Path("/packageA") 11 | public class ResourceInPackageA { 12 | @Operation(operationId = "test.") 13 | @GET 14 | public void getTest(@Parameter(name = "test") ArrayList tenantId) { 15 | return; 16 | } 17 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/com/my/sorted/resources/SortedThing.java: -------------------------------------------------------------------------------- 1 | package com.my.sorted.resources; 2 | 3 | import io.swagger.v3.jaxrs2.resources.model.Pet; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | 9 | @Path("/sorted") 10 | public class SortedThing { 11 | 12 | @Operation(operationId = "foo") 13 | @GET 14 | @Path("/pet") 15 | public Pet foo() { 16 | return null; 17 | } 18 | 19 | @Operation(operationId = "bar") 20 | @GET 21 | @Path("/pet") 22 | public Pet bar() { 23 | return null; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/JaxbObjectMapperFactory.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule; 5 | import io.swagger.v3.core.util.ObjectMapperFactory; 6 | 7 | public class JaxbObjectMapperFactory extends ObjectMapperFactory { 8 | 9 | public static ObjectMapper getMapper() { 10 | ObjectMapper mapper = ObjectMapperFactory.createJson(); 11 | mapper.registerModule(new JaxbAnnotationModule()); 12 | return mapper; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/it/model/Widget.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.it.model; 2 | 3 | public class Widget { 4 | 5 | private String a; 6 | private String b; 7 | private String id; 8 | 9 | public String getA() { 10 | return a; 11 | } 12 | 13 | public Widget setA(String a) { 14 | this.a = a; 15 | return this; 16 | } 17 | 18 | public String getB() { 19 | return b; 20 | } 21 | 22 | public Widget setB(String b) { 23 | this.b = b; 24 | return this; 25 | } 26 | 27 | public String getId() { 28 | return id; 29 | } 30 | 31 | public Widget setId(String id) { 32 | this.id = id; 33 | return this; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/it/resources/UrlEncodedResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.it.resources; 2 | 3 | import javax.ws.rs.Consumes; 4 | import javax.ws.rs.FormParam; 5 | import javax.ws.rs.POST; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.Produces; 8 | import javax.ws.rs.core.MediaType; 9 | import javax.ws.rs.core.Response; 10 | 11 | @Path("/users") 12 | @Produces("application/json") 13 | public class UrlEncodedResource { 14 | @POST 15 | @Path("/add") 16 | @Consumes(MediaType.APPLICATION_FORM_URLENCODED) 17 | public Response addUser(@FormParam("id") final String id, @FormParam("name") final String name, 18 | @FormParam("gender") final String gender) { 19 | return Response.status(200).entity("Adding user " + id + " to the system.").build(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/EmptyPetResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore; 2 | 3 | /** 4 | * An Empty PetResource Class 5 | */ 6 | public class EmptyPetResource { 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/example/SubscriptionResponse.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.example; 2 | 3 | public class SubscriptionResponse { 4 | public String subscriptionId; 5 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/AnnotatedSameNameOperationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.operation; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.DELETE; 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | 9 | /** 10 | * Resource With a Default Operation without Annotation 11 | */ 12 | public class AnnotatedSameNameOperationResource { 13 | @Path("/sameOperationName") 14 | @GET 15 | @Operation(description = "Same Operation Name") 16 | public String getUser() { 17 | return new String(); 18 | } 19 | 20 | @Path("//sameOperationName") 21 | @DELETE 22 | @Operation(description = "Same Operation Name Duplicated") 23 | public String getUser(final String id) { 24 | return new String(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/InterfaceResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.operation; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | import io.swagger.v3.oas.annotations.Parameter; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.PathParam; 9 | import javax.ws.rs.core.Response; 10 | 11 | /** 12 | * Interface resource 13 | */ 14 | public interface InterfaceResource { 15 | @GET 16 | @Path("/interfaceoperation/{petId}") 17 | @Operation(summary = "Find pet by ID Operation in Parent", 18 | description = "Returns a pet in Parent" 19 | ) 20 | Response getPetById(@Parameter(description = "ID of pet that needs to be fetched", required = true) 21 | @PathParam("petId")final Long petId); 22 | } 23 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/NotAnnotatedSameNameOperationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.operation; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | 6 | /** 7 | * Resource With a Default Operation without Annotation 8 | */ 9 | public class NotAnnotatedSameNameOperationResource { 10 | @Path("/notannotatedoperation") 11 | @GET 12 | public String getUser() { 13 | return new String(); 14 | } 15 | 16 | @Path("/notannotatedoperationduplicated") 17 | @GET 18 | public String getUser(final String id) { 19 | return new String(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/OperationWithoutAnnotationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.operation; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | 6 | /** 7 | * Resource With a Default Operation without Annotation 8 | */ 9 | public class OperationWithoutAnnotationResource { 10 | @Path("/operationwithouannotation") 11 | @GET 12 | public String getUser() { 13 | return new String(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/operation/SubResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.operation; 2 | 3 | import io.swagger.v3.jaxrs2.resources.model.Pet; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | 6 | import javax.ws.rs.core.Response; 7 | 8 | /** 9 | * SubResource 10 | */ 11 | 12 | public class SubResource implements InterfaceResource { 13 | @Override 14 | @Operation(summary = "Find pet by ID Operation in SubResource", 15 | description = "Returns a pet in SubResource" 16 | ) 17 | public Response getPetById(final Long petId) { 18 | return Response.ok().entity(new Pet()).build(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/MultipleNotAnnotatedParameter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.parameter; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.POST; 6 | import javax.ws.rs.Path; 7 | 8 | /** 9 | * Class with a multiple not annotated parameter. 10 | */ 11 | public class MultipleNotAnnotatedParameter { 12 | @POST 13 | @Path("/multiplenoannotatedparameter") 14 | @Operation(operationId = "create User") 15 | public void createUser(final String id, final String name) { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/OpenAPIJaxRSAnnotatedParameter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.parameter; 2 | 3 | import io.swagger.v3.jaxrs2.resources.model.User; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | import io.swagger.v3.oas.annotations.Parameter; 6 | 7 | import javax.ws.rs.GET; 8 | import javax.ws.rs.Path; 9 | import javax.ws.rs.QueryParam; 10 | 11 | /** 12 | * Class with a single parameter annotated with jaxrs and open api annotation. 13 | */ 14 | public class OpenAPIJaxRSAnnotatedParameter { 15 | @GET 16 | @Path("/openapijaxrsannotatedparameter") 17 | @Operation(operationId = "create User") 18 | public User findUser(@Parameter(description = "idParam") @QueryParam("id") final String id) { 19 | return new User(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/SingleJaxRSAnnotatedParameter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.parameter; 2 | 3 | import io.swagger.v3.jaxrs2.resources.model.User; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.QueryParam; 9 | 10 | /** 11 | * Class with a single parameter annotated with jaxrs. 12 | */ 13 | public class SingleJaxRSAnnotatedParameter { 14 | @GET 15 | @Path("/singlejaxrsannotatedparameter") 16 | @Operation(operationId = "create User") 17 | public User findUser(@QueryParam("id") final String id) { 18 | return new User(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/parameter/SingleNotAnnotatedParameter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.parameter; 2 | 3 | import io.swagger.v3.jaxrs2.resources.model.User; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | 9 | /** 10 | * Class with a single not annotated parameter. 11 | */ 12 | public class SingleNotAnnotatedParameter { 13 | @GET 14 | @Path("/singlenoannotatedparameter") 15 | @Operation(operationId = "create User") 16 | public User findUser(final String id) { 17 | return new User(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/responses/NoResponseResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.responses; 2 | 3 | import io.swagger.v3.jaxrs2.resources.exception.NotFoundException; 4 | import io.swagger.v3.jaxrs2.resources.model.User; 5 | import io.swagger.v3.oas.annotations.Operation; 6 | 7 | import javax.ws.rs.GET; 8 | import javax.ws.rs.Path; 9 | 10 | /** 11 | * Resource with a Response at Method Level 12 | */ 13 | public class NoResponseResource { 14 | @GET 15 | @Path("/noresponse") 16 | @Operation(summary = "Find pets", 17 | description = "Returns the Pets") 18 | public User getPets() throws NotFoundException { 19 | return new User(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/tags/TagClassResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.tags; 2 | 3 | import io.swagger.v3.oas.annotations.ExternalDocumentation; 4 | import io.swagger.v3.oas.annotations.tags.Tag; 5 | 6 | /** 7 | * Class with Tag Annotations at Class level 8 | */ 9 | @Tag(name = "Second Tag") 10 | @Tag(name = "Fourth Tag Full", description = "desc class", externalDocs = @ExternalDocumentation(description = "docs desc class")) 11 | @Tag(name = "Fifth Tag Full", description = "desc class", externalDocs = @ExternalDocumentation(description = "docs desc class")) 12 | @Tag(name = "Sixth Tag") 13 | public class TagClassResource { 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/tags/TagMethodResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.tags; 2 | 3 | import io.swagger.v3.oas.annotations.ExternalDocumentation; 4 | import io.swagger.v3.oas.annotations.tags.Tag; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.core.Response; 9 | 10 | public class TagMethodResource { 11 | @GET 12 | @Path("/tagsinmethod") 13 | @Tag(name = "Third Tag") 14 | @Tag(name = "Second Tag") 15 | @Tag(name = "Fourth Tag Full", description = "desc", externalDocs = @ExternalDocumentation(description = "docs desc")) 16 | public Response getTags() { 17 | return Response.ok().entity("ok").build(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/tags/TagOpenAPIDefinitionResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.tags; 2 | 3 | import io.swagger.v3.oas.annotations.OpenAPIDefinition; 4 | import io.swagger.v3.oas.annotations.tags.Tag; 5 | 6 | /** 7 | * Tag in the OpenAPIDefinition annotation 8 | */ 9 | @OpenAPIDefinition(tags = { 10 | @Tag(name = "Definition First Tag"), 11 | @Tag(name = "Definition Second Tag full", description = "desc definition") 12 | }) 13 | public class TagOpenAPIDefinitionResource { 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore/tags/TagOperationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore.tags; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.core.Response; 8 | 9 | /** 10 | * Resource with a Tag at Operation Level 11 | */ 12 | public class TagOperationResource { 13 | 14 | @GET 15 | @Path("/tagoperation") 16 | @Operation(tags = {"Example Tag", "Second Tag"}) 17 | public Response getTags() { 18 | return Response.ok().entity("ok").build(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore31/SimpleCategory.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore31; 2 | public class SimpleCategory {} 3 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/petstore31/TagResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.petstore31; 2 | 3 | import io.swagger.v3.oas.annotations.parameters.RequestBody; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | 8 | @Path("/tag") 9 | public class TagResource { 10 | @GET 11 | @Path("/tag") 12 | public SimpleTag getTag(@RequestBody SimpleCategory category) { 13 | return null; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ArraySchemaImplementationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.media.ArraySchema; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import java.util.List; 9 | 10 | public class ArraySchemaImplementationResource { 11 | 12 | static class Pet { 13 | @ArraySchema(schema = @Schema(implementation = Integer.class, description = "A house in a street")) 14 | public List cars; 15 | } 16 | 17 | @GET 18 | @Path("/test") 19 | public Pet test() { 20 | return null; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/BasicClass.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | public class BasicClass { 4 | public void emptyMethod() { 5 | } 6 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ClassPathParentResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import javax.ws.rs.Path; 4 | 5 | @Path("/v1") 6 | public class ClassPathParentResource { 7 | @Path("parent") 8 | public ClassPathSubResource getSubResource() { 9 | return new ClassPathSubResource(); 10 | } 11 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ClassPathSubResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.OpenAPIDefinition; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | import io.swagger.v3.oas.annotations.info.Info; 6 | 7 | import javax.ws.rs.GET; 8 | import javax.ws.rs.Path; 9 | import javax.ws.rs.PathParam; 10 | 11 | @OpenAPIDefinition(info = @Info(description = "Subresource Class")) 12 | @Path("subresource") 13 | public class ClassPathSubResource { 14 | 15 | @GET 16 | @Operation(operationId = "get Code") 17 | public String getCode() { 18 | return "400"; 19 | } 20 | 21 | @GET 22 | @Path("{id}") 23 | public String getWidget(@PathParam("id") String id) { 24 | return "widget"; 25 | } 26 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Client.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | public class Client { 4 | 5 | private String name; 6 | private int creditCard; 7 | 8 | public String getName() { 9 | return name; 10 | } 11 | 12 | public void setName(String name) { 13 | this.name = name; 14 | } 15 | 16 | public int getCreditCard() { 17 | return creditCard; 18 | } 19 | 20 | public void setCreditCard(int creditCard) { 21 | this.creditCard = creditCard; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/CreditCard.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | public class CreditCard { 4 | 5 | private String billingAddress; 6 | 7 | public String getBillingAddress() { 8 | return billingAddress; 9 | } 10 | 11 | public void setBillingAddress(String billingAddress) { 12 | this.billingAddress = billingAddress; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/DefaultResponseResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | 6 | public class DefaultResponseResource { 7 | 8 | @GET 9 | @Path("/") 10 | public String test() { 11 | return null; 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/DeprecatedFieldsResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.core.Response; 8 | 9 | public class DeprecatedFieldsResource { 10 | @GET 11 | @Path("/") 12 | @Operation(deprecated = true) 13 | public Response deprecatedMethod() { 14 | return Response.ok().entity("ok").build(); 15 | } 16 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/JsonIdentityCyclicResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.jaxrs2.resources.model.ModelWithJsonIdentityCyclic; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | import io.swagger.v3.oas.annotations.Parameter; 6 | 7 | import javax.ws.rs.POST; 8 | import javax.ws.rs.Path; 9 | import javax.ws.rs.Produces; 10 | import javax.ws.rs.core.Response; 11 | 12 | @Path("/pet") 13 | @Produces({"application/json", "application/xml"}) 14 | public class JsonIdentityCyclicResource { 15 | 16 | @POST 17 | @Operation(description = "Add a single object") 18 | public Response test( 19 | @Parameter(required = true) ModelWithJsonIdentityCyclic model) { 20 | return Response.ok().entity("SUCCESS").build(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/JsonIdentityResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.jaxrs2.resources.model.ModelWithJsonIdentity; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | import io.swagger.v3.oas.annotations.Parameter; 6 | 7 | import javax.ws.rs.POST; 8 | import javax.ws.rs.Path; 9 | 10 | import javax.ws.rs.Produces; 11 | import javax.ws.rs.core.Response; 12 | 13 | @Path("/pet") 14 | @Produces({"application/json", "application/xml"}) 15 | public class JsonIdentityResource { 16 | 17 | @POST 18 | @Operation(description = "Add a single object") 19 | public Response test( 20 | @Parameter(required = true) ModelWithJsonIdentity model) { 21 | return Response.ok().entity("SUCCESS").build(); 22 | } 23 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Misc31Resource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import javax.ws.rs.PUT; 4 | import javax.ws.rs.Path; 5 | import javax.ws.rs.Produces; 6 | 7 | @Path("/pet") 8 | @Produces({"application/json", "application/xml"}) 9 | public class Misc31Resource { 10 | @PUT 11 | public ModelWithOAS31Stuff updatePet(){ return null;} 12 | 13 | } 14 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/MyOtherClass.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import javax.xml.bind.annotation.XmlAttribute; 4 | import javax.xml.bind.annotation.XmlElement; 5 | 6 | public class MyOtherClass extends MySuperClass { 7 | 8 | public void populate(final String myPropertyName) { 9 | this.myProperty = myPropertyName; 10 | } 11 | 12 | @XmlElement(name = "MyPrOperTyName") 13 | @XmlAttribute(name = "MyPrOperTyName") 14 | private String myProperty; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/MySuperClass.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | 6 | @XmlAccessorType(XmlAccessType.FIELD) 7 | public class MySuperClass { 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/NoPathSubResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.GET; 6 | 7 | /** 8 | * The {@code NoPathSubResource} class defines test sub-resource without 9 | * {@link javax.ws.rs.Path} annotations. 10 | */ 11 | public class NoPathSubResource { 12 | 13 | @Operation(description = "Returns greeting") 14 | @GET 15 | public String getGreeting() { 16 | return "Hello!"; 17 | } 18 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/PostalCodeNumberPattern.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | 6 | public class PostalCodeNumberPattern { 7 | 8 | private Object postalCode; 9 | 10 | @Schema( 11 | pattern = "[0-9]{5}(-[0-9]{4})?" 12 | ) 13 | public Object getPostalCode() { 14 | return postalCode; 15 | } 16 | 17 | public void setPostalCode(Object postalCode) { 18 | this.postalCode = postalCode; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/PostalCodePattern.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | public class PostalCodePattern { 6 | 7 | private Object postalCode; 8 | 9 | @Schema( 10 | pattern = "[A-Z][0-9][A-Z] [0-9][A-Z][0-9]" 11 | ) 12 | public Object getPostalCode() { 13 | return postalCode; 14 | } 15 | 16 | public void setPostalCode(Object postalCode) { 17 | this.postalCode = postalCode; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/QueryResultBean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import javax.ws.rs.QueryParam; 4 | 5 | public class QueryResultBean { 6 | @QueryParam("skip") 7 | private Integer skip; 8 | 9 | @QueryParam("limit") 10 | private Integer limit; 11 | 12 | public Integer getSkip() { 13 | return skip; 14 | } 15 | 16 | public void setSkip(Integer skip) { 17 | this.skip = skip; 18 | } 19 | 20 | public Integer getLimit() { 21 | return limit; 22 | } 23 | 24 | public void setLimit(Integer limit) { 25 | this.limit = limit; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefParameter3029Resource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | import io.swagger.v3.oas.annotations.Parameter; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | 9 | public class RefParameter3029Resource { 10 | 11 | @GET 12 | @Path("/1") 13 | @Operation( 14 | summary = "Simple get operation", 15 | operationId = "sendPayload1", 16 | parameters = @Parameter(ref = "id")) 17 | public void sendPayload1() { 18 | } 19 | 20 | @GET 21 | @Path("/2") 22 | @Operation( 23 | summary = "Simple get operation", 24 | operationId = "sendPayload2") 25 | @Parameter(ref = "id") 26 | public void sendPayload2() { 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefParameterResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | import io.swagger.v3.oas.annotations.Parameter; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.QueryParam; 9 | 10 | public class RefParameterResource { 11 | 12 | @GET 13 | @Path("/") 14 | @Operation( 15 | summary = "Simple get operation", 16 | description = "Defines a simple get operation with a payload complex input object", 17 | operationId = "sendPayload", 18 | deprecated = true 19 | ) 20 | public void sendPayload(@Parameter(ref = "id") @QueryParam("id") final int id) { 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/RefRequestBodyResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.jaxrs2.resources.model.User; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | import io.swagger.v3.oas.annotations.parameters.RequestBody; 6 | 7 | import javax.ws.rs.GET; 8 | import javax.ws.rs.Path; 9 | 10 | public class RefRequestBodyResource { 11 | 12 | @GET 13 | @Path("/") 14 | @Operation( 15 | summary = "Simple get operation", 16 | description = "Defines a simple get operation with a payload complex input object", 17 | operationId = "sendPayload", 18 | deprecated = true, 19 | requestBody = @RequestBody(ref = "User") 20 | ) 21 | public void sendPayload(final User user) { 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ResourceWithJacksonBean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.jaxrs2.resources.model.JacksonBean; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | 6 | import javax.ws.rs.POST; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.Produces; 9 | 10 | @Path("test") 11 | @Produces("application/json") 12 | public class ResourceWithJacksonBean { 13 | 14 | @POST 15 | @Path("/document/{documentName}.json") 16 | @Operation(operationId = "uploadAttachAndParseUserDocument", description = "Uploads, parses, and attaches the document to the user's job application.") 17 | public String uploadDocument(JacksonBean bean) throws Exception { 18 | return ""; 19 | } 20 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SiblingsResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.jaxrs2.resources.siblings.Pet; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.PathParam; 9 | import javax.ws.rs.Produces; 10 | import javax.ws.rs.core.MediaType; 11 | import java.util.List; 12 | 13 | @Path("/test") 14 | public class SiblingsResource { 15 | @GET 16 | @Schema(description = "Cart Pet") 17 | public Pet getCart() { 18 | return null; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/SubResourceTail.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.PathParam; 8 | 9 | public class SubResourceTail { 10 | 11 | @Operation(description = "Returns greeting") 12 | @GET 13 | @Path("/hello") 14 | public String getGreeting() { 15 | return "Hello!"; 16 | } 17 | 18 | @Operation(description = "Echoes passed string") 19 | @GET 20 | @Path("{string}") 21 | public String getEcho(@PathParam("string") String string) { 22 | return string; 23 | } 24 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/TestSub2607.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | import javax.ws.rs.Produces; 6 | import javax.ws.rs.core.MediaType; 7 | 8 | @Produces(MediaType.APPLICATION_JSON) 9 | public class TestSub2607 { 10 | @GET 11 | @Path("version") 12 | @Produces(MediaType.TEXT_PLAIN) 13 | public String getSubResourceVersion() { 14 | return "1.0.0"; 15 | } 16 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/TestSubResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.Produces; 8 | import javax.ws.rs.core.MediaType; 9 | 10 | @Produces(MediaType.APPLICATION_JSON) 11 | public class TestSubResource { 12 | @Path("/otherStatus") 13 | @GET 14 | @Operation(description = "Get the other status!") 15 | public String otherStatus() { 16 | return "{\"a\":\"Still Ok!\"}"; 17 | } 18 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2644AnnotatedInterface.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.tags.Tag; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.core.Response; 8 | 9 | @Path("resources") 10 | @Tag(name = "resource") 11 | public interface Ticket2644AnnotatedInterface { 12 | @GET 13 | Response getResource(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2644ConcreteImplementation.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import javax.ws.rs.core.Response; 4 | 5 | public class Ticket2644ConcreteImplementation implements Ticket2644AnnotatedInterface { 6 | public Response getResource() { 7 | // Get the resource 8 | return null; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket2848Resource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.media.ArraySchema; 4 | import io.swagger.v3.oas.annotations.media.Schema; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import java.util.List; 9 | 10 | @Path("/") 11 | public class Ticket2848Resource { 12 | @GET 13 | public Town getter() { 14 | return null; 15 | } 16 | 17 | public static class Town { 18 | @ArraySchema( schema = @Schema(required = true), minItems = 1,uniqueItems = true ) 19 | public List streets; 20 | } 21 | 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4065Resource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.Parameter; 4 | import io.swagger.v3.oas.annotations.enums.Explode; 5 | import io.swagger.v3.oas.annotations.enums.ParameterIn; 6 | 7 | import javax.ws.rs.GET; 8 | import javax.ws.rs.Path; 9 | import javax.ws.rs.Produces; 10 | 11 | @Path("/bar") 12 | public class Ticket4065Resource { 13 | @GET 14 | @Path("") 15 | @Produces({"application/json"}) 16 | public void test( 17 | @Parameter(in = ParameterIn.QUERY, name = "blub", explode = Explode.FALSE) Long[] ids 18 | ) {} 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4412Resource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.Parameter; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.PathParam; 8 | import javax.ws.rs.Produces; 9 | import javax.ws.rs.core.MediaType; 10 | import java.util.List; 11 | 12 | @Path("/test") 13 | public class Ticket4412Resource { 14 | @Path("/sws/{var:.*}") 15 | @GET 16 | @Produces(MediaType.TEXT_XML) 17 | public List getCart(@PathParam("var") String var) { 18 | return null; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4446Resource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | import java.util.List; 6 | 7 | @Path("/test") 8 | public class Ticket4446Resource { 9 | @Path("test") 10 | @GET 11 | public MyPojo getCart() { 12 | return null; 13 | } 14 | 15 | public static class MyPojo { 16 | public List someStrings; 17 | public List morePojos; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4859Resource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | import javax.ws.rs.PUT; 5 | import javax.ws.rs.Path; 6 | 7 | @Path("/test") 8 | public class Ticket4859Resource { 9 | 10 | @PUT 11 | @Path("/minlength") 12 | public void minlength(Minlength minlength) {} 13 | 14 | public static class Minlength { 15 | @Schema(example = "4242424242424242", minLength = 12, maxLength = 19, required = true) 16 | public String name; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/Ticket4878Resource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.PathParam; 8 | 9 | @Path("{globalPathParam}") 10 | public class Ticket4878Resource { 11 | 12 | public Ticket4878Resource(@PathParam("globalPathParam") @Schema($comment="3.1 property for global path param") String globalPathParam) {} 13 | 14 | @GET 15 | @Path("{localPathParam}") 16 | public void getMethod(@PathParam("localPathParam") @Schema($comment="3.1 property for local path param") String localPathParam) {} 17 | } 18 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/UserAnnotation.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | 8 | @Retention(RetentionPolicy.RUNTIME) 9 | @Operation(tags = {"test"}) 10 | public @interface UserAnnotation { 11 | /** 12 | * The identifying name of the contact person/organization. 13 | * 14 | * @return the name of the contact 15 | **/ 16 | String name() default ""; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/UserAnnotationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources; 2 | 3 | import javax.validation.constraints.NotNull; 4 | import javax.ws.rs.GET; 5 | import javax.ws.rs.Path; 6 | import javax.ws.rs.Produces; 7 | import javax.ws.rs.core.MediaType; 8 | 9 | @Path("test") 10 | @Produces(MediaType.APPLICATION_JSON) 11 | public class UserAnnotationResource { 12 | @Path("/status") 13 | @GET 14 | @UserAnnotation(name = "test") 15 | @NotNull 16 | public String getStatus() { 17 | return "{\"status\":\"OK!\"}"; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/exception/ApiException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.exception; 2 | 3 | public class ApiException extends Exception { 4 | private int code; 5 | 6 | public ApiException(int code, String msg) { 7 | super(msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/exception/NotFoundException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.exception; 2 | 3 | public class NotFoundException extends ApiException { 4 | private int code; 5 | 6 | public NotFoundException(int code, String msg) { 7 | super(code, msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket2144/BaseDTO.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket2144; 2 | 3 | 4 | public class BaseDTO { 5 | 6 | public String name; 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket2144/Item.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket2144; 2 | 3 | 4 | public class Item extends BaseDTO { 5 | 6 | public String names; 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket2144/ItemWithChildren.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket2144; 2 | 3 | 4 | public class ItemWithChildren extends Item { 5 | 6 | public String names; 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3149/AggregateEndpoint.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3149; 2 | 3 | public interface AggregateEndpoint 4 | extends FirstEndpoint, SecondEndpoint { 5 | } 6 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3149/MainResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3149; 2 | 3 | import io.swagger.v3.oas.annotations.tags.Tag; 4 | 5 | import javax.ws.rs.Path; 6 | 7 | @Path("/test") 8 | @Tag(name = "Test inheritance on default implementation in interfaces") 9 | public class MainResource 10 | implements AggregateEndpoint { 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3149/OriginalEndpoint.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3149; 2 | 3 | public interface OriginalEndpoint { 4 | 5 | String originalEndpoint(C c); 6 | } 7 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3149/SampleDTO.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3149; 2 | 3 | 4 | public class SampleDTO { 5 | 6 | public String name; 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3149/SampleOtherDTO.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3149; 2 | 3 | public class SampleOtherDTO { 4 | 5 | public String label; 6 | } 7 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3426/Parent.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3426; 2 | 3 | public class Parent { 4 | public T get(String input) { 5 | return null; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3426/Ticket3426Resource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3426; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | import javax.ws.rs.PathParam; 6 | 7 | @Path("/inheritExample") 8 | public class Ticket3426Resource extends Parent { 9 | @Override 10 | @GET 11 | @Path("/{input}") 12 | public String get(@PathParam("input") String input) { 13 | return super.get(input); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceInterface.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3694; 2 | 3 | import javax.ws.rs.core.Response; 4 | import java.util.List; 5 | 6 | public interface Ticket3694ResourceInterface { 7 | 8 | Response foo(List foo); 9 | 10 | T bar(List foo); 11 | 12 | Response another(T foo); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceInterfaceExtendedType.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3694; 2 | 3 | import javax.ws.rs.core.Response; 4 | import java.util.List; 5 | 6 | public interface Ticket3694ResourceInterfaceExtendedType { 7 | 8 | Response foo(List foo); 9 | 10 | T bar(List foo); 11 | 12 | Response another(T foo); 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceInterfaceSimple.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3694; 2 | 3 | import java.util.List; 4 | 5 | public interface Ticket3694ResourceInterfaceSimple { 6 | 7 | T bar(List foo); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceInterfaceSimpleSameReturn.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3694; 2 | 3 | import javax.ws.rs.core.Response; 4 | import java.util.List; 5 | 6 | public interface Ticket3694ResourceInterfaceSimpleSameReturn { 7 | 8 | Response bar(List foo); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceSimple.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3694; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.Consumes; 6 | import javax.ws.rs.POST; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.core.MediaType; 9 | import java.util.List; 10 | 11 | @Path("/") 12 | public class Ticket3694ResourceSimple implements Ticket3694ResourceInterfaceSimple { 13 | 14 | 15 | 16 | @POST 17 | @Path("bar") 18 | @Consumes(MediaType.APPLICATION_JSON) 19 | @Operation 20 | @Override 21 | public String bar(List foo) { 22 | return null; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/generics/ticket3694/Ticket3694ResourceSimpleSameReturn.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.generics.ticket3694; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.Consumes; 6 | import javax.ws.rs.POST; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.core.MediaType; 9 | import javax.ws.rs.core.Response; 10 | import java.util.List; 11 | 12 | @Path("/") 13 | public class Ticket3694ResourceSimpleSameReturn implements Ticket3694ResourceInterfaceSimpleSameReturn { 14 | 15 | 16 | 17 | @POST 18 | @Path("bar") 19 | @Consumes(MediaType.APPLICATION_JSON) 20 | @Operation 21 | @Override 22 | public Response bar(List foo) { 23 | return null; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/ListOfStringsBeanParam.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.model; 2 | 3 | import java.util.List; 4 | 5 | import javax.ws.rs.QueryParam; 6 | 7 | public class ListOfStringsBeanParam { 8 | @QueryParam(value = "listOfStrings") 9 | private List list; 10 | 11 | public List getList() { 12 | return list; 13 | } 14 | 15 | public void setList(List list) { 16 | this.list = list; 17 | } 18 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/MultipleBaseBean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.model; 2 | 3 | @io.swagger.v3.oas.annotations.media.Schema( 4 | description = "MultipleBaseBean", 5 | subTypes = { MultipleSub1Bean.class, MultipleSub2Bean.class } 6 | ) 7 | public class MultipleBaseBean { 8 | public String beanType; 9 | public int a; 10 | public String b; 11 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/MultipleSub1Bean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.model; 2 | 3 | @io.swagger.v3.oas.annotations.media.Schema( 4 | description = "MultipleSub1Bean" 5 | ) 6 | public class MultipleSub1Bean extends MultipleBaseBean { 7 | public int c; 8 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/MultipleSub2Bean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.model; 2 | 3 | @io.swagger.v3.oas.annotations.media.Schema( 4 | description = "MultipleSub2Bean" 5 | ) 6 | public class MultipleSub2Bean extends MultipleBaseBean { 7 | public int d; 8 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/NotFoundModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.model; 2 | 3 | public class NotFoundModel { 4 | int code; 5 | String message; 6 | 7 | public NotFoundModel() { 8 | } 9 | 10 | public NotFoundModel(int code, String message) { 11 | this.code = code; 12 | this.message = message; 13 | } 14 | 15 | public int getCode() { 16 | return code; 17 | } 18 | 19 | public void setCode(int code) { 20 | this.code = code; 21 | } 22 | 23 | public String getMessage() { 24 | return message; 25 | } 26 | 27 | public void setMessage(String message) { 28 | this.message = message; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/Tag.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.model; 2 | 3 | import javax.xml.bind.annotation.XmlElement; 4 | import javax.xml.bind.annotation.XmlRootElement; 5 | 6 | @XmlRootElement(name = "Tag") 7 | public class Tag { 8 | private long id; 9 | private String name; 10 | 11 | @XmlElement(name = "id") 12 | public long getId() { 13 | return id; 14 | } 15 | 16 | public void setId(long id) { 17 | this.id = id; 18 | } 19 | 20 | @XmlElement(name = "name") 21 | public String getName() { 22 | return name; 23 | } 24 | 25 | public void setName(String name) { 26 | this.name = name; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/rs/AbstractEntityRestService.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.rs; 2 | 3 | public abstract class AbstractEntityRestService implements EntityRestService { 4 | 5 | public DTO create(DTO object) throws Exception { 6 | return null; 7 | } 8 | 9 | } 10 | 11 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/rs/EntityRestService.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.rs; 2 | 3 | import javax.ws.rs.POST; 4 | import javax.ws.rs.Path; 5 | 6 | public interface EntityRestService { 7 | 8 | @POST 9 | @Path("/") 10 | public DTO create(DTO object) throws Exception; 11 | 12 | 13 | } 14 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/rs/PersistentDTO.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.rs; 2 | 3 | public class PersistentDTO { 4 | 5 | private String guid; 6 | 7 | public void setGuid(String guid) { 8 | this.guid = guid; 9 | } 10 | 11 | public String getGuid() { 12 | return guid; 13 | } 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/rs/ProcessTokenDTO.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.rs; 2 | 3 | public class ProcessTokenDTO extends PersistentDTO { 4 | 5 | private String name; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/rs/ProcessTokenRestService.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.rs; 2 | 3 | import javax.ws.rs.Consumes; 4 | import javax.ws.rs.Path; 5 | import javax.ws.rs.Produces; 6 | import javax.ws.rs.core.MediaType; 7 | 8 | @Path("token") 9 | @Consumes(MediaType.APPLICATION_JSON) 10 | @Produces(MediaType.APPLICATION_JSON) 11 | public class ProcessTokenRestService extends AbstractEntityRestService { 12 | 13 | 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/siblings/Category.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.siblings; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema(description = "parent") 6 | public class Category { 7 | private long id; 8 | 9 | public long getId() { 10 | return id; 11 | } 12 | 13 | public void setId(long id) { 14 | this.id = id; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/siblings/Pet.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.siblings; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema(description = "Pet") 6 | public class Pet { 7 | private Category category; 8 | 9 | @Schema(description = "child") 10 | public Category getCategory() { 11 | return category; 12 | } 13 | 14 | public void setCategory(Category category) { 15 | this.category = category; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/siblings/PetSimple.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.siblings; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | @Schema(description = "Pet") 6 | public class PetSimple { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ticket3624/model/ByIdResponse.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.ticket3624.model; 2 | 3 | import java.util.Map; 4 | 5 | public abstract class ByIdResponse { 6 | public abstract Map getModelsById(); 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ticket3624/model/ContainerizedResponse.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.ticket3624.model; 2 | 3 | import java.util.List; 4 | 5 | public abstract class ContainerizedResponse { 6 | public abstract List getContainerizedModels(); 7 | public abstract int getTotalCount(); 8 | } 9 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ticket3624/model/Model.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.ticket3624.model; 2 | 3 | import io.swagger.v3.oas.annotations.media.Schema; 4 | 5 | import java.util.Optional; 6 | 7 | 8 | public abstract class Model { 9 | // this is the ID of the review 10 | public abstract int getId(); 11 | 12 | public abstract String getText(); 13 | 14 | public abstract String getTitle(); 15 | 16 | public abstract boolean isActive(); 17 | 18 | public abstract Optional getOptionalString(); 19 | 20 | public abstract Optional getParent(); 21 | 22 | @Schema 23 | public abstract Optional getSchemaParent(); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ticket3624/model/ModelContainer.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.ticket3624.model; 2 | 3 | 4 | import java.util.Optional; 5 | 6 | 7 | public abstract class ModelContainer { 8 | public abstract Optional getModel(); 9 | public abstract int getId(); 10 | public abstract String getText(); 11 | } 12 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/ticket3624/model/Response.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.jaxrs2.resources.ticket3624.model; 2 | 3 | import java.util.List; 4 | 5 | public abstract class Response { 6 | public abstract List getModels(); 7 | 8 | public abstract int getCount(); 9 | } 10 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/java/org/my/project/resources/ResourceInPackageB.java: -------------------------------------------------------------------------------- 1 | package org.my.project.resources; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | import io.swagger.v3.oas.annotations.Parameter; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import java.util.ArrayList; 9 | 10 | @Path("/packageB") 11 | public class ResourceInPackageB { 12 | @Operation(operationId = "test.") 13 | @GET 14 | public void getTest(@Parameter(name = "test") ArrayList tenantId) { 15 | return; 16 | } 17 | } -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ERROR 5 | 6 | 7 | %d [%thread]%level %logger - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/EmptyPetResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/OpenAPI31DefinitionResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.1.0 2 | info: 3 | title: Pet Resource Example 4 | description: API Definition 5 | summary: API Summary 6 | termsOfService: Terms of service 7 | contact: 8 | name: Fred 9 | url: http://gigantic-server.com 10 | email: Fred@gigagantic-server.com 11 | license: 12 | name: Apache 2.0 13 | url: http://foo.bar 14 | identifier: Apache 15 | version: "2.0" 16 | 17 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/callbacks/SimpleCallbackWithOperationResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | /simplecallback: 4 | get: 5 | summary: Simple get operation 6 | operationId: getWithNoParameters 7 | responses: 8 | "200": 9 | description: voila! 10 | callbacks: 11 | testCallback1: 12 | http://www.url.com: 13 | get: 14 | summary: get all the reviews 15 | operationId: getAllReviews 16 | responses: 17 | "200": 18 | description: successful operation 19 | content: 20 | application/json: 21 | schema: 22 | type: integer 23 | format: int32 24 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/links/LinksResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | /links: 4 | get: 5 | operationId: getUserWithAddress 6 | parameters: 7 | - name: userId 8 | in: query 9 | schema: 10 | type: string 11 | responses: 12 | default: 13 | description: test description 14 | content: 15 | '*/*': 16 | schema: 17 | $ref: "#/components/schemas/User" 18 | links: 19 | address: 20 | operationId: getAddress 21 | parameters: 22 | userId: $request.query.userId 23 | user: 24 | operationId: getUser 25 | parameters: 26 | userId: $request.query.userId 27 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/operation/AnnotatedSameNameOperationResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | /sameOperationName: 4 | get: 5 | description: Same Operation Name 6 | operationId: getUser 7 | responses: 8 | default: 9 | description: default response 10 | content: 11 | '*/*': 12 | schema: 13 | type: string 14 | delete: 15 | description: Same Operation Name Duplicated 16 | operationId: getUser_1 17 | requestBody: 18 | content: 19 | '*/*': 20 | schema: 21 | type: string 22 | responses: 23 | default: 24 | description: default response 25 | content: 26 | '*/*': 27 | schema: 28 | type: string 29 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/operation/ExternalDocumentationResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | /{petId}: 4 | get: 5 | summary: Find pet by ID 6 | description: Returns a pet when 0 < ID <= 10. ID > 10 or non integers will 7 | simulate API error conditions 8 | externalDocs: 9 | description: External Annotation Documentation 10 | url: http://url.me 11 | operationId: petId 12 | parameters: 13 | - name: petId 14 | in: path 15 | description: ID of pet that needs to be fetched 16 | required: true 17 | schema: 18 | type: integer 19 | format: int64 20 | responses: 21 | default: 22 | description: default response 23 | content: 24 | '*/*': {} 25 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/operation/HiddenOperationResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/operation/NotAnnotatedSameNameOperationResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | /notannotatedoperation: 4 | get: 5 | operationId: getUser 6 | responses: 7 | default: 8 | description: default response 9 | content: 10 | '*/*': 11 | schema: 12 | type: string 13 | /notannotatedoperationduplicated: 14 | get: 15 | operationId: getUser_1 16 | requestBody: 17 | content: 18 | '*/*': 19 | schema: 20 | type: string 21 | responses: 22 | default: 23 | description: default response 24 | content: 25 | '*/*': 26 | schema: 27 | type: string 28 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/operation/OperationWithoutAnnotationResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | /operationwithouannotation: 4 | get: 5 | operationId: getUser 6 | responses: 7 | default: 8 | description: default response 9 | content: 10 | '*/*': 11 | schema: 12 | type: string 13 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/operation/SubResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | /interfaceoperation/{petId}: 4 | get: 5 | summary: Find pet by ID Operation in SubResource 6 | description: Returns a pet in SubResource 7 | operationId: getPetById 8 | parameters: 9 | - name: petId 10 | in: path 11 | description: ID of pet that needs to be fetched 12 | required: true 13 | schema: 14 | type: integer 15 | format: int64 16 | responses: 17 | default: 18 | description: default response 19 | content: 20 | '*/*': {} 21 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/parameters/MultipleNotAnnotatedParameter.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | /multiplenoannotatedparameter: 4 | post: 5 | operationId: create User 6 | requestBody: 7 | content: 8 | '*/*': 9 | schema: 10 | type: string 11 | responses: 12 | default: 13 | description: default response 14 | content: 15 | '*/*': {} 16 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/responses/MethodResponseResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | /responseinmethod: 4 | get: 5 | summary: Find pets 6 | description: Returns the Pets 7 | operationId: getPets 8 | responses: 9 | "200": 10 | description: Status OK 11 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/responses/OperationResponseResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | /responseinoperation: 4 | get: 5 | summary: Find Users 6 | description: Returns the Users 7 | operationId: getUsers 8 | responses: 9 | "200": 10 | description: Status OK 11 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/responses/PriorityResponseResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | /priorityresponses: 4 | get: 5 | summary: Find pets 6 | description: Returns the Pets 7 | operationId: getPets 8 | responses: 9 | "200": 10 | description: Inside Method Operation 11 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/tags/CompleteTagResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | tags: 3 | - name: Definition First Tag 4 | - name: Definition Second Tag full 5 | description: desc definition 6 | - name: Fourth Tag Full 7 | description: desc 8 | externalDocs: 9 | description: docs desc 10 | - name: Fifth Tag Full 11 | description: desc class 12 | externalDocs: 13 | description: docs desc class 14 | paths: 15 | /completetags: 16 | get: 17 | tags: 18 | - Third Tag 19 | - Second Tag 20 | - Fourth Tag Full 21 | - Example Tag 22 | - Fifth Tag Full 23 | - Sixth Tag 24 | operationId: getTags 25 | responses: 26 | default: 27 | description: default response 28 | content: 29 | '*/*': {} 30 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/tags/TagClassResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | tags: 3 | - name: Fourth Tag Full 4 | description: desc class 5 | externalDocs: 6 | description: docs desc class 7 | - name: Fifth Tag Full 8 | description: desc class 9 | externalDocs: 10 | description: docs desc class 11 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/tags/TagMethodResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | tags: 3 | - name: Fourth Tag Full 4 | description: desc 5 | externalDocs: 6 | description: docs desc 7 | paths: 8 | /tagsinmethod: 9 | get: 10 | tags: 11 | - Third Tag 12 | - Second Tag 13 | - Fourth Tag Full 14 | operationId: getTags 15 | responses: 16 | default: 17 | description: default response 18 | content: 19 | '*/*': {} 20 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/tags/TagOpenAPIDefinitionResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | tags: 3 | - name: Definition First Tag 4 | - name: Definition Second Tag full 5 | description: desc definition 6 | -------------------------------------------------------------------------------- /modules/swagger-jaxrs2/src/test/resources/petstore/tags/TagOperationResource.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | paths: 3 | /tagoperation: 4 | get: 5 | tags: 6 | - Example Tag 7 | - Second Tag 8 | operationId: getTags 9 | responses: 10 | default: 11 | description: default response 12 | content: 13 | '*/*': {} 14 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/EmptyPetResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore; 2 | 3 | /** 4 | * An Empty PetResource Class 5 | */ 6 | public class EmptyPetResource { 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/example/SubscriptionResponse.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.example; 2 | 3 | public class SubscriptionResponse { 4 | public String subscriptionId; 5 | } -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/NotAnnotatedSameNameOperationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.operation; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | 6 | /** 7 | * Resource With a Default Operation without Annotation 8 | */ 9 | public class NotAnnotatedSameNameOperationResource { 10 | @Path("/notannotatedoperation") 11 | @GET 12 | public String getUser() { 13 | return new String(); 14 | } 15 | 16 | @Path("/notannotatedoperationduplicated") 17 | @GET 18 | public String getUser(final String id) { 19 | return new String(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/OperationWithoutAnnotationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.operation; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | 6 | /** 7 | * Resource With a Default Operation without Annotation 8 | */ 9 | public class OperationWithoutAnnotationResource { 10 | @Path("/operationwithouannotation") 11 | @GET 12 | public String getUser() { 13 | return new String(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/ServerOperationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.operation; 2 | 3 | import io.swagger.v3.plugin.maven.resources.model.Pet; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | import io.swagger.v3.oas.annotations.servers.Server; 6 | 7 | import javax.ws.rs.GET; 8 | import javax.ws.rs.Path; 9 | 10 | /** 11 | * Resource With a Hidden Operation 12 | */ 13 | public class ServerOperationResource { 14 | @Path("/serversoperation") 15 | @GET 16 | @Operation(operationId = "Pets", description = "Pets Example", 17 | servers = { 18 | @Server(description = "server 2", url = "http://foo2") 19 | } 20 | ) 21 | public Pet getPet() { 22 | return new Pet(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/operation/SubResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.operation; 2 | 3 | import io.swagger.v3.plugin.maven.resources.model.Pet; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | 6 | import javax.ws.rs.core.Response; 7 | 8 | /** 9 | * SubResource 10 | */ 11 | 12 | public class SubResource implements InterfaceResource { 13 | @Override 14 | @Operation(summary = "Find pet by ID Operation in SubResource", 15 | description = "Returns a pet in SubResource" 16 | ) 17 | public Response getPetById(final Long petId) { 18 | return Response.ok().entity(new Pet()).build(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/MultipleNotAnnotatedParameter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.parameter; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.POST; 6 | import javax.ws.rs.Path; 7 | 8 | /** 9 | * Class with a multiple not annotated parameter. 10 | */ 11 | public class MultipleNotAnnotatedParameter { 12 | @POST 13 | @Path("/multiplenoannotatedparameter") 14 | @Operation(operationId = "create User") 15 | public void createUser(final String id, final String name) { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/SingleJaxRSAnnotatedParameter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.parameter; 2 | 3 | import io.swagger.v3.plugin.maven.resources.model.User; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.QueryParam; 9 | 10 | /** 11 | * Class with a single parameter annotated with jaxrs. 12 | */ 13 | public class SingleJaxRSAnnotatedParameter { 14 | @GET 15 | @Path("/singlejaxrsannotatedparameter") 16 | @Operation(operationId = "create User") 17 | public User findUser(@QueryParam("id") final String id) { 18 | return new User(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/parameter/SingleNotAnnotatedParameter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.parameter; 2 | 3 | import io.swagger.v3.plugin.maven.resources.model.User; 4 | import io.swagger.v3.oas.annotations.Operation; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | 9 | /** 10 | * Class with a single not annotated parameter. 11 | */ 12 | public class SingleNotAnnotatedParameter { 13 | @GET 14 | @Path("/singlenoannotatedparameter") 15 | @Operation(operationId = "create User") 16 | public User findUser(final String id) { 17 | return new User(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/responses/NoResponseResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.responses; 2 | 3 | import io.swagger.v3.plugin.maven.resources.exception.NotFoundException; 4 | import io.swagger.v3.plugin.maven.resources.model.User; 5 | import io.swagger.v3.oas.annotations.Operation; 6 | 7 | import javax.ws.rs.GET; 8 | import javax.ws.rs.Path; 9 | 10 | /** 11 | * Resource with a Response at Method Level 12 | */ 13 | public class NoResponseResource { 14 | @GET 15 | @Path("/noresponse") 16 | @Operation(summary = "Find pets", 17 | description = "Returns the Pets") 18 | public User getPets() throws NotFoundException { 19 | return new User(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/tags/TagClassResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.tags; 2 | 3 | import io.swagger.v3.oas.annotations.ExternalDocumentation; 4 | import io.swagger.v3.oas.annotations.tags.Tag; 5 | 6 | /** 7 | * Class with Tag Annotations at Class level 8 | */ 9 | @Tag(name = "Second Tag") 10 | @Tag(name = "Fourth Tag Full", description = "desc class", externalDocs = @ExternalDocumentation(description = "docs desc class")) 11 | @Tag(name = "Fifth Tag Full", description = "desc class", externalDocs = @ExternalDocumentation(description = "docs desc class")) 12 | @Tag(name = "Sixth Tag") 13 | public class TagClassResource { 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/tags/TagMethodResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.tags; 2 | 3 | import io.swagger.v3.oas.annotations.ExternalDocumentation; 4 | import io.swagger.v3.oas.annotations.tags.Tag; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.core.Response; 9 | 10 | public class TagMethodResource { 11 | @GET 12 | @Path("/tagsinmethod") 13 | @Tag(name = "Third Tag") 14 | @Tag(name = "Second Tag") 15 | @Tag(name = "Fourth Tag Full", description = "desc", externalDocs = @ExternalDocumentation(description = "docs desc")) 16 | public Response getTags() { 17 | return Response.ok().entity("ok").build(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/tags/TagOpenAPIDefinitionResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.tags; 2 | 3 | import io.swagger.v3.oas.annotations.OpenAPIDefinition; 4 | import io.swagger.v3.oas.annotations.tags.Tag; 5 | 6 | /** 7 | * Tag in the OpenAPIDefinition annotation 8 | */ 9 | @OpenAPIDefinition(tags = { 10 | @Tag(name = "Definition First Tag"), 11 | @Tag(name = "Definition Second Tag full", description = "desc definition") 12 | }) 13 | public class TagOpenAPIDefinitionResource { 14 | } 15 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/petstore/petstore/tags/TagOperationResource.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.petstore.petstore.tags; 2 | 3 | import io.swagger.v3.oas.annotations.Operation; 4 | 5 | import javax.ws.rs.GET; 6 | import javax.ws.rs.Path; 7 | import javax.ws.rs.core.Response; 8 | 9 | /** 10 | * Resource with a Tag at Operation Level 11 | */ 12 | public class TagOperationResource { 13 | 14 | @GET 15 | @Path("/tagoperation") 16 | @Operation(tags = {"Example Tag", "Second Tag"}) 17 | public Response getTags() { 18 | return Response.ok().entity("ok").build(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/QueryResultBean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.resources; 2 | 3 | import javax.ws.rs.QueryParam; 4 | 5 | public class QueryResultBean { 6 | @QueryParam("skip") 7 | private Integer skip; 8 | 9 | @QueryParam("limit") 10 | private Integer limit; 11 | 12 | public Integer getSkip() { 13 | return skip; 14 | } 15 | 16 | public void setSkip(Integer skip) { 17 | this.skip = skip; 18 | } 19 | 20 | public Integer getLimit() { 21 | return limit; 22 | } 23 | 24 | public void setLimit(Integer limit) { 25 | this.limit = limit; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/exception/ApiException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.resources.exception; 2 | 3 | public class ApiException extends Exception { 4 | private int code; 5 | 6 | public ApiException(int code, String msg) { 7 | super(msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/exception/NotFoundException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.resources.exception; 2 | 3 | public class NotFoundException extends ApiException { 4 | private int code; 5 | 6 | public NotFoundException(int code, String msg) { 7 | super(code, msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/ListOfStringsBeanParam.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.resources.model; 2 | 3 | import javax.ws.rs.QueryParam; 4 | import java.util.List; 5 | 6 | public class ListOfStringsBeanParam { 7 | @QueryParam(value = "listOfStrings") 8 | private List list; 9 | 10 | public List getList() { 11 | return list; 12 | } 13 | 14 | public void setList(List list) { 15 | this.list = list; 16 | } 17 | } -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/MultipleBaseBean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.resources.model; 2 | 3 | @io.swagger.v3.oas.annotations.media.Schema( 4 | description = "MultipleBaseBean", 5 | subTypes = { MultipleSub1Bean.class, MultipleSub2Bean.class } 6 | ) 7 | public class MultipleBaseBean { 8 | public String beanType; 9 | public int a; 10 | public String b; 11 | } -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/MultipleSub1Bean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.resources.model; 2 | 3 | @io.swagger.v3.oas.annotations.media.Schema( 4 | description = "MultipleSub1Bean" 5 | ) 6 | public class MultipleSub1Bean extends MultipleBaseBean { 7 | public int c; 8 | } -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/MultipleSub2Bean.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.resources.model; 2 | 3 | @io.swagger.v3.oas.annotations.media.Schema( 4 | description = "MultipleSub2Bean" 5 | ) 6 | public class MultipleSub2Bean extends MultipleBaseBean { 7 | public int d; 8 | } -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/NotFoundModel.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.resources.model; 2 | 3 | public class NotFoundModel { 4 | int code; 5 | String message; 6 | 7 | public NotFoundModel() { 8 | } 9 | 10 | public NotFoundModel(int code, String message) { 11 | this.code = code; 12 | this.message = message; 13 | } 14 | 15 | public int getCode() { 16 | return code; 17 | } 18 | 19 | public void setCode(int code) { 20 | this.code = code; 21 | } 22 | 23 | public String getMessage() { 24 | return message; 25 | } 26 | 27 | public void setMessage(String message) { 28 | this.message = message; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/resources/model/Tag.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.plugin.maven.resources.model; 2 | 3 | import javax.xml.bind.annotation.XmlElement; 4 | import javax.xml.bind.annotation.XmlRootElement; 5 | 6 | @XmlRootElement(name = "Tag") 7 | public class Tag { 8 | private long id; 9 | private String name; 10 | 11 | @XmlElement(name = "id") 12 | public long getId() { 13 | return id; 14 | } 15 | 16 | public void setId(long id) { 17 | this.id = id; 18 | } 19 | 20 | @XmlElement(name = "name") 21 | public String getName() { 22 | return name; 23 | } 24 | 25 | public void setName(String name) { 26 | this.name = name; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/resources/configurationFile.yaml: -------------------------------------------------------------------------------- 1 | resourcePackages: 2 | - io.swagger.v3.plugin.maven.petstore.petstore 3 | prettyPrint: true 4 | cacheTTL: 0 5 | openAPI: 6 | openapi: 3.0.1 7 | servers: 8 | - url: http://foo 9 | description: server 1 10 | variables: 11 | var1: 12 | description: var 1 13 | enum: 14 | - "1" 15 | - "2" 16 | default: "1" 17 | var2: 18 | description: var 2 19 | enum: 20 | - "1" 21 | - "2" 22 | default: "1" 23 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/resources/configurationFile2.yaml: -------------------------------------------------------------------------------- 1 | resourcePackages: 2 | - io.swagger.v3.plugin.maven.petstore.petstore 3 | prettyPrint: true 4 | openAPI31: true 5 | convertToOpenAPI31: true 6 | cacheTTL: 0 7 | openAPI: 8 | openapi: 3.0.1 9 | info: 10 | version: 1.0.0 11 | title: OpenAPI 3.0 12 | servers: 13 | - url: http://bar 14 | description: server 1 15 | paths: {} 16 | components: 17 | schemas: 18 | Address: 19 | type: object 20 | properties: 21 | street: 22 | type: string 23 | example: 437 Lytton 24 | code: 25 | type: integer 26 | format: int32 27 | minimum: 1 28 | maximum: 50 29 | exclusiveMaximum: true 30 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ERROR 5 | 6 | 7 | %d [%thread]%level %logger - %msg%n 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/resources/openapiinput.json: -------------------------------------------------------------------------------- 1 | { 2 | "openapi": "3.0.1", 3 | "servers": [ 4 | { 5 | "url": "http://foo", 6 | "description": "server 1", 7 | "variables": { 8 | "var1": { 9 | "description": "var 1", 10 | "enum": [ 11 | "1", 12 | "2" 13 | ], 14 | "default": "1" 15 | }, 16 | "var2": { 17 | "description": "var 2", 18 | "enum": [ 19 | "1", 20 | "2" 21 | ], 22 | "default": "1" 23 | } 24 | } 25 | } 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/resources/openapiinput.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | servers: 3 | - url: http://foo 4 | description: server 1 5 | variables: 6 | var1: 7 | description: var 1 8 | enum: 9 | - "1" 10 | - "2" 11 | default: "1" 12 | var2: 13 | description: var 2 14 | enum: 15 | - "1" 16 | - "2" 17 | default: "1" 18 | -------------------------------------------------------------------------------- /modules/swagger-maven-plugin/src/test/resources/openapiinput2.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | servers: 3 | - url: http://bar 4 | description: server 1 5 | variables: 6 | var1: 7 | description: var 1 8 | enum: 9 | - "1" 10 | - "2" 11 | default: "1" 12 | -------------------------------------------------------------------------------- /modules/swagger-models/CODE_COVERAGE.md: -------------------------------------------------------------------------------- 1 | # Code Coverage Report generation 2 | 3 | To generate the code coverage report, execute the following command: 4 | > mvn clean verify 5 | 6 | This will generate code coverage report in each of the modules. In order to view the same, open the following file in your browser. 7 | > target/site/jacoco/index.html -------------------------------------------------------------------------------- /modules/swagger-models/src/main/java/io/swagger/v3/oas/models/SpecVersion.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.models; 2 | 3 | public enum SpecVersion { 4 | V30, 5 | V31 6 | } 7 | -------------------------------------------------------------------------------- /modules/swagger-models/src/main/java/io/swagger/v3/oas/models/annotations/OpenAPI30.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.models.annotations; 2 | 3 | import java.lang.annotation.Inherited; 4 | 5 | @Inherited 6 | public @interface OpenAPI30 { 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-models/src/main/java/io/swagger/v3/oas/models/annotations/OpenAPI31.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.models.annotations; 2 | 3 | import java.lang.annotation.Inherited; 4 | 5 | @Inherited 6 | public @interface OpenAPI31 { 7 | } 8 | -------------------------------------------------------------------------------- /modules/swagger-models/src/main/java/io/swagger/v3/oas/models/media/ComposedSchema.java: -------------------------------------------------------------------------------- 1 | package io.swagger.v3.oas.models.media; 2 | 3 | /** 4 | * ComposedSchema 5 | */ 6 | 7 | public class ComposedSchema extends Schema { 8 | 9 | 10 | @Override 11 | public String toString() { 12 | StringBuilder sb = new StringBuilder(); 13 | sb.append("class ComposedSchema {\n"); 14 | sb.append(" ").append(toIndentedString(super.toString())).append("\n"); 15 | sb.append("}"); 16 | return sb.toString(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /modules/swagger-project-jakarta/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | lib/*.jar 3 | target 4 | .idea 5 | .idea_modules 6 | .settings 7 | .project 8 | .classpath 9 | .cache 10 | atlassian-ide-plugin.xml 11 | *.iml 12 | .java-version 13 | sonar-project.properties 14 | test-output/ 15 | *.pyc 16 | **/transformed/*.jar 17 | **/transformed/*.test-jar 18 | **/transformed/*.maven-plugin 19 | -------------------------------------------------------------------------------- /modules/swagger-project-jakarta/modules/swagger-maven-plugin-jakarta/transformed/README.md: -------------------------------------------------------------------------------- 1 | #### Don't delete 2 | 3 | Target directory for eclipse transformer plugin; Jakarta EE 9+ artifacts are generated in this directory 4 | -------------------------------------------------------------------------------- /swagger-shot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swagger-api/swagger-core/852ed24f50f7b5f3cf9d162346362cdff25acc1f/swagger-shot.jpg --------------------------------------------------------------------------------