Skip to content

Commit

Permalink
OAS 3.1 - minor tweaks and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Jun 12, 2023
1 parent 03b9c03 commit f1ec883
Show file tree
Hide file tree
Showing 26 changed files with 898 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
/**
* A short API summary.
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return API summary
**/
@OpenAPI31
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
/**
* An identifier for a License instance.
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return the identifier of the license
**/
@OpenAPI31
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/**
* The schemas of the items in the array
*
* @since 2.2.4
* @since 2.2.12
*
* @return items
*/
Expand Down Expand Up @@ -92,7 +92,7 @@
/**
* Specifies contains constrictions expressions.
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return contains expression.
*/
@OpenAPI31
Expand All @@ -101,7 +101,7 @@
/**
* Provides max contains related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return max contains
*/
@OpenAPI31
Expand All @@ -110,7 +110,7 @@
/**
* Provides min contains related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return min contains
*/
@OpenAPI31
Expand All @@ -119,7 +119,7 @@
/**
* Provides unevaluted items to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return unevaluated items
*/
@OpenAPI31
Expand All @@ -128,7 +128,7 @@
/**
* Provides prefix items to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return prefixItems
*/
@OpenAPI31
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
/**
* Subschemas to be applied for a given condition.
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return list of dependent schemas.
*/
@OpenAPI31
Expand All @@ -97,7 +97,7 @@
/**
* Provides the content schema related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return content schema
*/
@OpenAPI31
Expand All @@ -106,7 +106,7 @@
/**
* Provides property names related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return proeprty names
*/
@OpenAPI31
Expand All @@ -115,7 +115,7 @@
/**
* Provides the if sub schema related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return if schema
*/
@OpenAPI31
Expand All @@ -124,7 +124,7 @@
/**
* Provides the then sub schema related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return then schema
*/
@OpenAPI31
Expand All @@ -133,7 +133,7 @@
/**
* Provides the else sub schema related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return else schema
*/
@OpenAPI31
Expand All @@ -142,31 +142,31 @@
/**
* Set schemas to validate according a given condition.
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return not schema to be validated
**/
Schema not() default @Schema();

/**
* Provides the oneOf sub schemas related to this schema.
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return oneOf sub schemas
**/
Schema[] oneOf() default {};

/**
* Provides the anyOf sub schemas related to this schema.
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return anyOf sub schemas
**/
Schema[] anyOf() default {};

/**
* Provides the allOf sub schemas related to this schema..
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return allOf sub schemas
**/
Schema[] allOf() default {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @see Schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
**/
@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Container for repeatable {@link DependentRequired} annotation
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @see DependentRequired
*/
@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @see Schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
**/
@Target({FIELD, METHOD, PARAMETER, TYPE, ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
/**
* The list of optional extensions
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return an optional array of extensions
*/
@OpenAPI31
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,14 @@
/**
* List of schema types
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return array of types
*/
@OpenAPI31
String[] types() default {};

/**
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
*
* OAS 3.1 version of `exclusiveMaximum`, accepting a numeric value
*
Expand All @@ -359,7 +359,7 @@
/**
* Provides an exclusive minimum for a expressing exclusive range.
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return an exclusive minimum.
*/
@OpenAPI31
Expand All @@ -375,7 +375,7 @@
/**
* Provides the $id related to this schema.
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return the $id of schema
*/
@OpenAPI31
Expand All @@ -384,7 +384,7 @@
/**
* Provides Json Schema dialect where the schema is valid.
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return json schema dialect
*/
@OpenAPI31
Expand All @@ -393,7 +393,7 @@
/**
* Provides the $anchor related to schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return $anchor schema
*/
@OpenAPI31
Expand All @@ -402,7 +402,7 @@
/**
* Provides the content encoding related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return content encoding
*/
@OpenAPI31
Expand All @@ -411,7 +411,7 @@
/**
* Provides the content media type related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return content media type
*/
@OpenAPI31
Expand All @@ -420,7 +420,7 @@
/**
* Provides the content schema related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return content schema
*/
@OpenAPI31
Expand All @@ -429,7 +429,7 @@
/**
* Provides property names related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return property names
*/
@OpenAPI31
Expand Down Expand Up @@ -464,7 +464,7 @@
/**
* Provides the if sub schema related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return if sub schema
*/
@OpenAPI31
Expand All @@ -473,7 +473,7 @@
/**
* Provides the else sub schema related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return else sub schema
*/
@OpenAPI31
Expand All @@ -482,7 +482,7 @@
/**
* Provides the then sub schema related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return then sub schema
*/
@OpenAPI31
Expand All @@ -491,7 +491,7 @@
/**
* Provides $comment related to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return $comment related to schema
*/
@OpenAPI31
Expand All @@ -501,7 +501,7 @@
* Provides a list of examples related to this schema
* @return list of examples
*/
Class<?>[] examples() default {};
Class<?>[] exampleClasses() default {};

/**
* Allows to specify the additionalProperties value
Expand Down Expand Up @@ -539,7 +539,7 @@ enum RequiredMode {
/**
* Allows to specify the dependentRequired value
**
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return the list of DependentRequire annotations
*
*/
Expand All @@ -549,7 +549,7 @@ enum RequiredMode {
/**
* Allows to specify the dependentSchemas value providing a Class to be resolved into a Schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return the list of dependentSchemas annotations
*
*/
Expand All @@ -559,7 +559,7 @@ enum RequiredMode {
/**
* Provides pattern properties to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return pattern properties
*/
@OpenAPI31
Expand All @@ -575,7 +575,7 @@ enum RequiredMode {
/**
* Provides unevaluated properties to this schema
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return unevaluated properties
*/
@OpenAPI31
Expand All @@ -593,7 +593,7 @@ enum RequiredMode {
/**
* Provides value restricted to this schema.
*
* @since 2.2.4 / OpenAPI 3.1
* @since 2.2.12 / OpenAPI 3.1
* @return const value
*/
@OpenAPI31
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import io.swagger.v3.core.util.ReferenceTypeUtils;
import io.swagger.v3.core.util.PrimitiveType;
import io.swagger.v3.core.util.ReflectionUtils;
import io.swagger.v3.core.util.Yaml31;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.StringToClassMapItem;
import io.swagger.v3.oas.annotations.media.DependentRequired;
Expand Down
Loading

0 comments on commit f1ec883

Please sign in to comment.