diff --git a/docs/apispec-docs/src/main/scala/sttp/tapir/docs/apispec/schema/SchemasForEndpoints.scala b/docs/apispec-docs/src/main/scala/sttp/tapir/docs/apispec/schema/SchemasForEndpoints.scala index 59a5b595bd..68c297739a 100644 --- a/docs/apispec-docs/src/main/scala/sttp/tapir/docs/apispec/schema/SchemasForEndpoints.scala +++ b/docs/apispec-docs/src/main/scala/sttp/tapir/docs/apispec/schema/SchemasForEndpoints.scala @@ -27,7 +27,7 @@ class SchemasForEndpoints( val keysToIds: Map[SchemaKey, SchemaId] = calculateUniqueIds(keyedCombinedSchemas.map(_._1), (key: SchemaKey) => schemaName(key.name)) val toSchemaReference = new ToSchemaReference(keysToIds, keyedCombinedSchemas.toMap) - val tschemaToASchema = new TSchemaToASchema(toSchemaReference, markOptionsAsNullable) + val tschemaToASchema = new TSchemaToASchema(schemaName, toSchemaReference, markOptionsAsNullable) val keysToSchemas: ListMap[SchemaKey, ASchema] = keyedCombinedSchemas.map(td => (td._1, tschemaToASchema(td._2, allowReference = false))).toListMap diff --git a/docs/apispec-docs/src/main/scala/sttp/tapir/docs/apispec/schema/TSchemaToASchema.scala b/docs/apispec-docs/src/main/scala/sttp/tapir/docs/apispec/schema/TSchemaToASchema.scala index 1a7cfc9c33..9ce9821ab6 100644 --- a/docs/apispec-docs/src/main/scala/sttp/tapir/docs/apispec/schema/TSchemaToASchema.scala +++ b/docs/apispec-docs/src/main/scala/sttp/tapir/docs/apispec/schema/TSchemaToASchema.scala @@ -1,7 +1,7 @@ package sttp.tapir.docs.apispec.schema import sttp.apispec.{Schema => ASchema, _} -import sttp.tapir.Schema.Title +import sttp.tapir.Schema.{SName, Title} import sttp.tapir.Validator.EncodeToRaw import sttp.tapir.docs.apispec.DocsExtensionAttribute.RichSchema import sttp.tapir.docs.apispec.schema.TSchemaToASchema.{tDefaultToADefault, tExampleToAExample} @@ -10,7 +10,11 @@ import sttp.tapir.internal._ import sttp.tapir.{Codec, Validator, Schema => TSchema, SchemaType => TSchemaType} /** Converts a tapir schema to an OpenAPI/AsyncAPI schema, using `toSchemaReference` to resolve references. */ -private[docs] class TSchemaToASchema(toSchemaReference: ToSchemaReference, markOptionsAsNullable: Boolean) { +private[docs] class TSchemaToASchema( + fallbackSchemaTitle: SName => String, + toSchemaReference: ToSchemaReference, + markOptionsAsNullable: Boolean +) { def apply[T](codec: Codec[T, _, _]): ASchema = apply(codec.schema, allowReference = true) @@ -93,8 +97,11 @@ private[docs] class TSchemaToASchema(toSchemaReference: ToSchemaReference, markO .toListMap } - private def addTitle(oschema: ASchema, tschema: TSchema[_]): ASchema = - oschema.copy(title = tschema.attributes.get(Title.Attribute).map(_.value)) + private def addTitle(oschema: ASchema, tschema: TSchema[_]): ASchema = { + val fromAttr = tschema.attributes.get(Title.Attribute).map(_.value) + def fallback = tschema.name.map(fallbackSchemaTitle) + oschema.copy(title = fromAttr orElse fallback) + } private def addMetadata(oschema: ASchema, tschema: TSchema[_]): ASchema = { oschema.copy( diff --git a/docs/apispec-docs/src/main/scala/sttp/tapir/docs/apispec/schema/TapirSchemaToJsonSchema.scala b/docs/apispec-docs/src/main/scala/sttp/tapir/docs/apispec/schema/TapirSchemaToJsonSchema.scala index febcaeb5b0..34392f80a4 100644 --- a/docs/apispec-docs/src/main/scala/sttp/tapir/docs/apispec/schema/TapirSchemaToJsonSchema.scala +++ b/docs/apispec-docs/src/main/scala/sttp/tapir/docs/apispec/schema/TapirSchemaToJsonSchema.scala @@ -19,7 +19,7 @@ object TapirSchemaToJsonSchema { val keysToIds = calculateUniqueIds(keyedSchemas.map(_._1), (key: SchemaKey) => schemaName(key.name)) val toSchemaReference = new ToSchemaReference(keysToIds, keyedSchemas.toMap, refRoot = "#/$defs/") - val tschemaToASchema = new TSchemaToASchema(toSchemaReference, markOptionsAsNullable) + val tschemaToASchema = new TSchemaToASchema(schemaName, toSchemaReference, markOptionsAsNullable) val keysToSchemas = keyedSchemas.map(td => (td._1, tschemaToASchema(td._2, allowReference = false))).toListMap val schemaIds = keysToSchemas.map { case (k, v) => k -> ((keysToIds(k), v)) } diff --git a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct.yml b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct.yml index 7a3f20ebb5..64e408a124 100644 --- a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct.yml +++ b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct.yml @@ -16,10 +16,12 @@ paths: components: schemas: Entity: + title: Entity oneOf: - $ref: '#/components/schemas/Organization' - $ref: '#/components/schemas/Person' Organization: + title: Organization required: - name type: object @@ -27,6 +29,7 @@ components: name: type: string Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_discriminator.yml b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_discriminator.yml index 463e3de2b6..2af61199ea 100644 --- a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_discriminator.yml +++ b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_discriminator.yml @@ -16,6 +16,7 @@ paths: components: schemas: Entity: + title: Entity oneOf: - $ref: '#/components/schemas/Organization' - $ref: '#/components/schemas/Person' @@ -25,6 +26,7 @@ components: john: '#/components/schemas/Person' sml: '#/components/schemas/Organization' Organization: + title: Organization required: - name type: object @@ -32,6 +34,7 @@ components: name: type: string Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_discriminator_nested.yml b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_discriminator_nested.yml index c39db6989e..2c81b14f52 100644 --- a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_discriminator_nested.yml +++ b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_discriminator_nested.yml @@ -16,6 +16,7 @@ paths: components: schemas: Entity: + title: Entity oneOf: - $ref: '#/components/schemas/Organization' - $ref: '#/components/schemas/Person' @@ -25,6 +26,7 @@ components: john: '#/components/schemas/Person' sml: '#/components/schemas/Organization' NestedEntity: + title: NestedEntity required: - entity type: object @@ -32,6 +34,7 @@ components: entity: $ref: '#/components/schemas/Entity' Organization: + title: Organization required: - name type: object @@ -39,6 +42,7 @@ components: name: type: string Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_discriminator_with_enum_circe.yml b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_discriminator_with_enum_circe.yml index accd19163c..51222d4f42 100644 --- a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_discriminator_with_enum_circe.yml +++ b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_discriminator_with_enum_circe.yml @@ -16,6 +16,7 @@ paths: components: schemas: Shape: + title: Shape oneOf: - $ref: '#/components/schemas/Square' discriminator: @@ -23,6 +24,7 @@ components: mapping: Square: '#/components/schemas/Square' Square: + title: Square required: - color - shapeType diff --git a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_independent.yml b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_independent.yml index 4076b99f49..1a8623fa65 100644 --- a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_independent.yml +++ b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_independent.yml @@ -54,6 +54,7 @@ paths: components: schemas: Entity: + title: Entity oneOf: - $ref: '#/components/schemas/Organization' - $ref: '#/components/schemas/Person1' @@ -63,6 +64,7 @@ components: organization: '#/components/schemas/Organization' person: '#/components/schemas/Person1' Organization: + title: Organization required: - name - kind @@ -73,6 +75,7 @@ components: kind: type: string Person: + title: Person required: - name - age @@ -84,6 +87,7 @@ components: type: integer format: int32 Person1: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_nested.yml b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_nested.yml index 80e2df4c8b..478291bbee 100644 --- a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_nested.yml +++ b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_nested.yml @@ -16,10 +16,12 @@ paths: components: schemas: Entity: + title: Entity oneOf: - $ref: '#/components/schemas/Organization' - $ref: '#/components/schemas/Person' NestedEntity: + title: NestedEntity required: - entity type: object @@ -27,6 +29,7 @@ components: entity: $ref: '#/components/schemas/Entity' Organization: + title: Organization required: - name type: object @@ -34,6 +37,7 @@ components: name: type: string Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_wrapped.yml b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_wrapped.yml index 76efe37480..c703256894 100644 --- a/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_wrapped.yml +++ b/docs/openapi-docs/src/test/resources/coproduct/expected_coproduct_wrapped.yml @@ -30,6 +30,7 @@ paths: components: schemas: Entity: + title: Entity oneOf: - required: - Organization @@ -44,6 +45,7 @@ components: Person: $ref: '#/components/schemas/Person' Organization: + title: Organization required: - name type: object @@ -51,6 +53,7 @@ components: name: type: string Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/coproduct/expected_generic_coproduct.yml b/docs/openapi-docs/src/test/resources/coproduct/expected_generic_coproduct.yml index 44607205ad..32ae41238f 100644 --- a/docs/openapi-docs/src/test/resources/coproduct/expected_generic_coproduct.yml +++ b/docs/openapi-docs/src/test/resources/coproduct/expected_generic_coproduct.yml @@ -42,12 +42,15 @@ paths: components: schemas: GenericEntity_Int: + title: GenericEntity_Int oneOf: - $ref: '#/components/schemas/GenericPerson_Int' GenericEntity_String: + title: GenericEntity_String oneOf: - $ref: '#/components/schemas/GenericPerson_String' GenericPerson_Int: + title: GenericPerson_Int required: - data type: object @@ -56,6 +59,7 @@ components: type: integer format: int32 GenericPerson_String: + title: GenericPerson_String required: - data type: object diff --git a/docs/openapi-docs/src/test/resources/coproduct/expected_recursive_coproducts.yml b/docs/openapi-docs/src/test/resources/coproduct/expected_recursive_coproducts.yml index 8327eaa280..3ac4631a3a 100644 --- a/docs/openapi-docs/src/test/resources/coproduct/expected_recursive_coproducts.yml +++ b/docs/openapi-docs/src/test/resources/coproduct/expected_recursive_coproducts.yml @@ -24,10 +24,12 @@ paths: components: schemas: Clause: + title: Clause oneOf: - $ref: '#/components/schemas/Expression' - $ref: '#/components/schemas/Not' Expression: + title: Expression required: - v type: object @@ -35,6 +37,7 @@ components: v: type: string Not: + title: Not required: - not type: object diff --git a/docs/openapi-docs/src/test/resources/coproduct/expected_unfolded_coproduct_unfolded_array.yml b/docs/openapi-docs/src/test/resources/coproduct/expected_unfolded_coproduct_unfolded_array.yml index 0860447aa5..f50b902f9a 100644 --- a/docs/openapi-docs/src/test/resources/coproduct/expected_unfolded_coproduct_unfolded_array.yml +++ b/docs/openapi-docs/src/test/resources/coproduct/expected_unfolded_coproduct_unfolded_array.yml @@ -18,10 +18,12 @@ paths: components: schemas: Entity: + title: Entity oneOf: - $ref: '#/components/schemas/Organization' - $ref: '#/components/schemas/Person' Organization: + title: Organization required: - name type: object @@ -29,6 +31,7 @@ components: name: type: string Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/decode_failure_output/expected_json_response_defined_in_options.yml b/docs/openapi-docs/src/test/resources/decode_failure_output/expected_json_response_defined_in_options.yml index c6b672dffa..c4fb69f96f 100644 --- a/docs/openapi-docs/src/test/resources/decode_failure_output/expected_json_response_defined_in_options.yml +++ b/docs/openapi-docs/src/test/resources/decode_failure_output/expected_json_response_defined_in_options.yml @@ -26,6 +26,7 @@ paths: components: schemas: Fail: + title: Fail required: - msg type: object diff --git a/docs/openapi-docs/src/test/resources/enum/expected_enum_collections.yml b/docs/openapi-docs/src/test/resources/enum/expected_enum_collections.yml index d66d726577..9d92d3e93b 100644 --- a/docs/openapi-docs/src/test/resources/enum/expected_enum_collections.yml +++ b/docs/openapi-docs/src/test/resources/enum/expected_enum_collections.yml @@ -16,11 +16,13 @@ paths: components: schemas: CornerStyle: + title: CornerStyle type: string enum: - rounded - straight Square: + title: Square type: object properties: cornerStyle: @@ -30,6 +32,7 @@ components: items: $ref: '#/components/schemas/Tag' Tag: + title: Tag type: string enum: - tag1 diff --git a/docs/openapi-docs/src/test/resources/enum/expected_enum_in_delimited_query.yml b/docs/openapi-docs/src/test/resources/enum/expected_enum_in_delimited_query.yml index 9993b9f10a..a1a590a524 100644 --- a/docs/openapi-docs/src/test/resources/enum/expected_enum_in_delimited_query.yml +++ b/docs/openapi-docs/src/test/resources/enum/expected_enum_in_delimited_query.yml @@ -27,6 +27,7 @@ paths: components: schemas: CornerStyle: + title: CornerStyle type: string enum: - rounded diff --git a/docs/openapi-docs/src/test/resources/enum/expected_enum_in_delimited_query_with_default.yml b/docs/openapi-docs/src/test/resources/enum/expected_enum_in_delimited_query_with_default.yml index bfde71d80c..b1cb85c456 100644 --- a/docs/openapi-docs/src/test/resources/enum/expected_enum_in_delimited_query_with_default.yml +++ b/docs/openapi-docs/src/test/resources/enum/expected_enum_in_delimited_query_with_default.yml @@ -33,6 +33,7 @@ paths: components: schemas: CornerStyle: + title: CornerStyle type: string enum: - rounded diff --git a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_adding_default_when_encoded_value_specified.yml b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_adding_default_when_encoded_value_specified.yml index 3c93d1e6aa..8d80cf75bb 100644 --- a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_adding_default_when_encoded_value_specified.yml +++ b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_adding_default_when_encoded_value_specified.yml @@ -28,17 +28,20 @@ paths: components: schemas: FruitQueryWithEncoded: + title: FruitQueryWithEncoded type: object properties: fruitType: $ref: '#/components/schemas/FruitType' default: PEAR FruitType: + title: FruitType type: string enum: - APPLE - PEAR FruitWithEnum: + title: FruitWithEnum required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_collection_component.yml b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_collection_component.yml index e56b1ccef2..f9dd37cb87 100644 --- a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_collection_component.yml +++ b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_collection_component.yml @@ -16,12 +16,14 @@ paths: components: schemas: CountryCode: + title: CountryCode type: string enum: - PL - BE - LU CountryCollection: + title: CountryCollection required: - countryCode type: object diff --git a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_component.yml b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_component.yml index f5abcaecd1..e7546c1b20 100644 --- a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_component.yml +++ b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_component.yml @@ -36,6 +36,7 @@ paths: components: schemas: Belgium: + title: Belgium required: - countryCode type: object @@ -43,12 +44,14 @@ components: countryCode: $ref: '#/components/schemas/CountryCode' CountryCode: + title: CountryCode type: string enum: - PL - BE - LU Luxembourg: + title: Luxembourg required: - countryCode type: object @@ -56,6 +59,7 @@ components: countryCode: $ref: '#/components/schemas/CountryCode' Poland: + title: Poland required: - countryCode type: object diff --git a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_default.yml b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_default.yml index b4823a309f..5ef7c16f04 100644 --- a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_default.yml +++ b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_default.yml @@ -30,11 +30,13 @@ paths: components: schemas: FruitType: + title: FruitType type: string enum: - APPLE - PEAR FruitWithEnum: + title: FruitWithEnum required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_not_adding_default_when_no_encoded_value_specified.yml b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_not_adding_default_when_no_encoded_value_specified.yml index 16f5a314e0..fd9474255f 100644 --- a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_not_adding_default_when_no_encoded_value_specified.yml +++ b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_not_adding_default_when_no_encoded_value_specified.yml @@ -28,16 +28,19 @@ paths: components: schemas: FruitQuery: + title: FruitQuery type: object properties: fruitType: $ref: '#/components/schemas/FruitType' FruitType: + title: FruitType type: string enum: - APPLE - PEAR FruitWithEnum: + title: FruitWithEnum required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_using_first_specified_default_value.yml b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_using_first_specified_default_value.yml index 0569ff41ad..afb46e645a 100644 --- a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_using_first_specified_default_value.yml +++ b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_enum_using_first_specified_default_value.yml @@ -52,11 +52,13 @@ paths: components: schemas: FruitType: + title: FruitType type: string enum: - APPLE - PEAR FruitWithEnum: + title: FruitWithEnum required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_int_enum_component.yml b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_int_enum_component.yml index 4fdd59cb96..e0449da1fe 100644 --- a/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_int_enum_component.yml +++ b/docs/openapi-docs/src/test/resources/enum/expected_enumeratum_int_enum_component.yml @@ -26,6 +26,7 @@ paths: components: schemas: Error1Response: + title: Error1Response required: - error type: object @@ -33,6 +34,7 @@ components: error: $ref: '#/components/schemas/ErrorCode' Error2Response: + title: Error2Response required: - error type: object @@ -40,6 +42,7 @@ components: error: $ref: '#/components/schemas/ErrorCode' ErrorCode: + title: ErrorCode type: integer format: int32 enum: diff --git a/docs/openapi-docs/src/test/resources/enum/expected_trait_enum_component.yml b/docs/openapi-docs/src/test/resources/enum/expected_trait_enum_component.yml index 757e983615..7c7e043e55 100644 --- a/docs/openapi-docs/src/test/resources/enum/expected_trait_enum_component.yml +++ b/docs/openapi-docs/src/test/resources/enum/expected_trait_enum_component.yml @@ -26,6 +26,7 @@ paths: components: schemas: CallOfDuty: + title: CallOfDuty required: - game - episode @@ -39,11 +40,13 @@ components: - first - second Game: + title: Game type: string enum: - action - strategy TotalWar: + title: TotalWar required: - game - episode diff --git a/docs/openapi-docs/src/test/resources/example/expected_examples_of_list_and_not_list_types.yml b/docs/openapi-docs/src/test/resources/example/expected_examples_of_list_and_not_list_types.yml index b2d1ef4877..8261a653d7 100644 --- a/docs/openapi-docs/src/test/resources/example/expected_examples_of_list_and_not_list_types.yml +++ b/docs/openapi-docs/src/test/resources/example/expected_examples_of_list_and_not_list_types.yml @@ -45,6 +45,7 @@ paths: components: schemas: Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/example/expected_multiple_examples.yml b/docs/openapi-docs/src/test/resources/example/expected_multiple_examples.yml index 0ea71d1e33..b540162211 100644 --- a/docs/openapi-docs/src/test/resources/example/expected_multiple_examples.yml +++ b/docs/openapi-docs/src/test/resources/example/expected_multiple_examples.yml @@ -90,10 +90,12 @@ paths: components: schemas: Entity: + title: Entity oneOf: - $ref: '#/components/schemas/Organization' - $ref: '#/components/schemas/Person' Organization: + title: Organization required: - name type: object @@ -101,6 +103,7 @@ components: name: type: string Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/example/expected_multiple_examples_with_default_names.yml b/docs/openapi-docs/src/test/resources/example/expected_multiple_examples_with_default_names.yml index 5b36a173d1..34c318496f 100644 --- a/docs/openapi-docs/src/test/resources/example/expected_multiple_examples_with_default_names.yml +++ b/docs/openapi-docs/src/test/resources/example/expected_multiple_examples_with_default_names.yml @@ -33,6 +33,7 @@ paths: components: schemas: Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/example/expected_multiple_examples_with_explicit_and_default_names.yml b/docs/openapi-docs/src/test/resources/example/expected_multiple_examples_with_explicit_and_default_names.yml index a253cf9649..15495a9ad0 100644 --- a/docs/openapi-docs/src/test/resources/example/expected_multiple_examples_with_explicit_and_default_names.yml +++ b/docs/openapi-docs/src/test/resources/example/expected_multiple_examples_with_explicit_and_default_names.yml @@ -33,6 +33,7 @@ paths: components: schemas: Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/example/expected_multiple_examples_with_names.yml b/docs/openapi-docs/src/test/resources/example/expected_multiple_examples_with_names.yml index e7e450990d..d9bcf515c9 100644 --- a/docs/openapi-docs/src/test/resources/example/expected_multiple_examples_with_names.yml +++ b/docs/openapi-docs/src/test/resources/example/expected_multiple_examples_with_names.yml @@ -28,10 +28,12 @@ paths: components: schemas: Entity: + title: Entity oneOf: - $ref: '#/components/schemas/Organization' - $ref: '#/components/schemas/Person' Organization: + title: Organization required: - name type: object @@ -39,6 +41,7 @@ components: name: type: string Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/example/expected_schema_example.yml b/docs/openapi-docs/src/test/resources/example/expected_schema_example.yml index 166f18672a..5d71de2dac 100644 --- a/docs/openapi-docs/src/test/resources/example/expected_schema_example.yml +++ b/docs/openapi-docs/src/test/resources/example/expected_schema_example.yml @@ -30,6 +30,7 @@ paths: components: schemas: Author: + title: Author required: - name - country @@ -40,6 +41,7 @@ components: country: $ref: '#/components/schemas/Country' Book: + title: Book required: - title - genre @@ -67,6 +69,7 @@ components: country: name: country Country: + title: Country required: - name type: object @@ -74,6 +77,7 @@ components: name: type: string Genre: + title: Genre required: - name - description diff --git a/docs/openapi-docs/src/test/resources/example/expected_schema_example_multiple_value.yml b/docs/openapi-docs/src/test/resources/example/expected_schema_example_multiple_value.yml index 684883797a..babb689484 100644 --- a/docs/openapi-docs/src/test/resources/example/expected_schema_example_multiple_value.yml +++ b/docs/openapi-docs/src/test/resources/example/expected_schema_example_multiple_value.yml @@ -24,6 +24,7 @@ paths: components: schemas: ContainsList: + title: ContainsList type: object properties: l: diff --git a/docs/openapi-docs/src/test/resources/example/expected_single_example_with_name.yml b/docs/openapi-docs/src/test/resources/example/expected_single_example_with_name.yml index 8b327ec7fa..412208fe00 100644 --- a/docs/openapi-docs/src/test/resources/example/expected_single_example_with_name.yml +++ b/docs/openapi-docs/src/test/resources/example/expected_single_example_with_name.yml @@ -23,10 +23,12 @@ paths: components: schemas: Entity: + title: Entity oneOf: - $ref: '#/components/schemas/Organization' - $ref: '#/components/schemas/Person' Organization: + title: Organization required: - name type: object @@ -34,6 +36,7 @@ components: name: type: string Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/example/expected_stream_example.yml b/docs/openapi-docs/src/test/resources/example/expected_stream_example.yml index d352c68151..1918c177b7 100644 --- a/docs/openapi-docs/src/test/resources/example/expected_stream_example.yml +++ b/docs/openapi-docs/src/test/resources/example/expected_stream_example.yml @@ -27,6 +27,7 @@ paths: components: schemas: Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/expected.yml b/docs/openapi-docs/src/test/resources/expected.yml index d6e5efceab..2b4d456642 100644 --- a/docs/openapi-docs/src/test/resources/expected.yml +++ b/docs/openapi-docs/src/test/resources/expected.yml @@ -81,6 +81,7 @@ paths: components: schemas: FruitAmount: + title: FruitAmount required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/expected_additional_properties.yml b/docs/openapi-docs/src/test/resources/expected_additional_properties.yml index b5a7d03a6f..b192a2efb5 100644 --- a/docs/openapi-docs/src/test/resources/expected_additional_properties.yml +++ b/docs/openapi-docs/src/test/resources/expected_additional_properties.yml @@ -16,10 +16,12 @@ paths: components: schemas: Map_Person: + title: Map_Person type: object additionalProperties: $ref: '#/components/schemas/Person' Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/expected_callbacks.yml b/docs/openapi-docs/src/test/resources/expected_callbacks.yml index 178e322616..9a0088e050 100644 --- a/docs/openapi-docs/src/test/resources/expected_callbacks.yml +++ b/docs/openapi-docs/src/test/resources/expected_callbacks.yml @@ -46,6 +46,7 @@ paths: components: schemas: TriggerRequest: + title: TriggerRequest required: - callbackUrl type: object @@ -53,6 +54,7 @@ components: callbackUrl: type: string CallbackRequest: + title: CallbackRequest required: - answer type: object diff --git a/docs/openapi-docs/src/test/resources/expected_custom_schema_name.yml b/docs/openapi-docs/src/test/resources/expected_custom_schema_name.yml index f5ce17014c..b8c6a9930e 100644 --- a/docs/openapi-docs/src/test/resources/expected_custom_schema_name.yml +++ b/docs/openapi-docs/src/test/resources/expected_custom_schema_name.yml @@ -81,6 +81,7 @@ paths: components: schemas: sttp.tapir.tests.data.FruitAmount: + title: sttp.tapir.tests.data.FruitAmount required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/expected_default_and_example_on_nested_option_field.yml b/docs/openapi-docs/src/test/resources/expected_default_and_example_on_nested_option_field.yml index d8585392d6..f1aefdb126 100644 --- a/docs/openapi-docs/src/test/resources/expected_default_and_example_on_nested_option_field.yml +++ b/docs/openapi-docs/src/test/resources/expected_default_and_example_on_nested_option_field.yml @@ -24,11 +24,13 @@ paths: components: schemas: ClassWithNestedOptionalField: + title: ClassWithNestedOptionalField type: object properties: value: $ref: '#/components/schemas/Nested' Nested: + title: Nested required: - nestedValue type: object diff --git a/docs/openapi-docs/src/test/resources/expected_default_request_body.yml b/docs/openapi-docs/src/test/resources/expected_default_request_body.yml index 77661478eb..6bf6b8a858 100644 --- a/docs/openapi-docs/src/test/resources/expected_default_request_body.yml +++ b/docs/openapi-docs/src/test/resources/expected_default_request_body.yml @@ -24,6 +24,7 @@ paths: components: schemas: ObjectWithDefaults: + title: ObjectWithDefaults type: object properties: name: diff --git a/docs/openapi-docs/src/test/resources/expected_descriptions_in_nested_custom_schemas.yml b/docs/openapi-docs/src/test/resources/expected_descriptions_in_nested_custom_schemas.yml index 4613612be2..cef1b6f206 100644 --- a/docs/openapi-docs/src/test/resources/expected_descriptions_in_nested_custom_schemas.yml +++ b/docs/openapi-docs/src/test/resources/expected_descriptions_in_nested_custom_schemas.yml @@ -18,6 +18,7 @@ paths: components: schemas: FruitAmount: + title: FruitAmount required: - fruit - amount @@ -30,6 +31,7 @@ components: format: int32 description: Amount of fruits ObjectWrapper: + title: ObjectWrapper required: - value type: object diff --git a/docs/openapi-docs/src/test/resources/expected_enumeration_values.yml b/docs/openapi-docs/src/test/resources/expected_enumeration_values.yml index cace27c1e9..9b8d1b4942 100644 --- a/docs/openapi-docs/src/test/resources/expected_enumeration_values.yml +++ b/docs/openapi-docs/src/test/resources/expected_enumeration_values.yml @@ -24,6 +24,7 @@ paths: components: schemas: Number: + title: Number required: - value type: object @@ -31,6 +32,7 @@ components: value: $ref: '#/components/schemas/Numbers' Numbers: + title: Numbers type: string enum: - One diff --git a/docs/openapi-docs/src/test/resources/expected_extensions.yml b/docs/openapi-docs/src/test/resources/expected_extensions.yml index 106fcad861..fe961e8382 100644 --- a/docs/openapi-docs/src/test/resources/expected_extensions.yml +++ b/docs/openapi-docs/src/test/resources/expected_extensions.yml @@ -58,6 +58,7 @@ paths: components: schemas: FruitAmount: + title: FruitAmount required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/expected_extensions_schema.yml b/docs/openapi-docs/src/test/resources/expected_extensions_schema.yml index aa746465c1..47742d60c1 100644 --- a/docs/openapi-docs/src/test/resources/expected_extensions_schema.yml +++ b/docs/openapi-docs/src/test/resources/expected_extensions_schema.yml @@ -24,6 +24,7 @@ paths: components: schemas: FruitAmount: + title: FruitAmount required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/expected_fields_with_additional_properties.yml b/docs/openapi-docs/src/test/resources/expected_fields_with_additional_properties.yml index 7b6dbd0cca..980d9e1d45 100644 --- a/docs/openapi-docs/src/test/resources/expected_fields_with_additional_properties.yml +++ b/docs/openapi-docs/src/test/resources/expected_fields_with_additional_properties.yml @@ -16,6 +16,7 @@ paths: components: schemas: FailureInput: + title: FailureInput required: - status - message diff --git a/docs/openapi-docs/src/test/resources/expected_full_schema_names.yml b/docs/openapi-docs/src/test/resources/expected_full_schema_names.yml index 02c67e0571..1c26d2d6e2 100644 --- a/docs/openapi-docs/src/test/resources/expected_full_schema_names.yml +++ b/docs/openapi-docs/src/test/resources/expected_full_schema_names.yml @@ -16,10 +16,12 @@ paths: components: schemas: Map_sttp_tapir_tests_data_FruitAmount: + title: Map_sttp_tapir_tests_data_FruitAmount type: object additionalProperties: $ref: '#/components/schemas/sttp_tapir_tests_data_FruitAmount' sttp_tapir_tests_data_FruitAmount: + title: sttp_tapir_tests_data_FruitAmount required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/expected_generic.yml b/docs/openapi-docs/src/test/resources/expected_generic.yml index abce388782..edc2a4171f 100644 --- a/docs/openapi-docs/src/test/resources/expected_generic.yml +++ b/docs/openapi-docs/src/test/resources/expected_generic.yml @@ -42,6 +42,7 @@ paths: components: schemas: G_Int: + title: G_Int required: - data type: object @@ -50,6 +51,7 @@ components: type: integer format: int32 G_String: + title: G_String required: - data type: object diff --git a/docs/openapi-docs/src/test/resources/expected_map_with_plain_values.yml b/docs/openapi-docs/src/test/resources/expected_map_with_plain_values.yml index 925adab0b5..ba40760ee6 100644 --- a/docs/openapi-docs/src/test/resources/expected_map_with_plain_values.yml +++ b/docs/openapi-docs/src/test/resources/expected_map_with_plain_values.yml @@ -16,6 +16,7 @@ paths: components: schemas: Map_String: + title: Map_String type: object additionalProperties: type: string diff --git a/docs/openapi-docs/src/test/resources/expected_multipart.yml b/docs/openapi-docs/src/test/resources/expected_multipart.yml index 224ad1c590..b6a8c0cbb9 100644 --- a/docs/openapi-docs/src/test/resources/expected_multipart.yml +++ b/docs/openapi-docs/src/test/resources/expected_multipart.yml @@ -28,6 +28,7 @@ paths: components: schemas: FruitData: + title: FruitData required: - data type: object diff --git a/docs/openapi-docs/src/test/resources/expected_nullable_option_class_field.yml b/docs/openapi-docs/src/test/resources/expected_nullable_option_class_field.yml index 6ebca2d162..15c75e1418 100644 --- a/docs/openapi-docs/src/test/resources/expected_nullable_option_class_field.yml +++ b/docs/openapi-docs/src/test/resources/expected_nullable_option_class_field.yml @@ -28,6 +28,7 @@ paths: components: schemas: Bar: + title: Bar required: - bar type: object @@ -36,6 +37,7 @@ components: type: integer format: int32 ClassWithOptionClassField: + title: ClassWithOptionClassField required: - requiredStringField type: object diff --git a/docs/openapi-docs/src/test/resources/expected_nullable_option_class_field_303.yml b/docs/openapi-docs/src/test/resources/expected_nullable_option_class_field_303.yml index d54aadb47c..34b488dbe1 100644 --- a/docs/openapi-docs/src/test/resources/expected_nullable_option_class_field_303.yml +++ b/docs/openapi-docs/src/test/resources/expected_nullable_option_class_field_303.yml @@ -28,6 +28,7 @@ paths: components: schemas: Bar: + title: Bar required: - bar type: object @@ -36,6 +37,7 @@ components: type: integer format: int32 ClassWithOptionClassField: + title: ClassWithOptionClassField required: - requiredStringField type: object diff --git a/docs/openapi-docs/src/test/resources/expected_nullable_option_field.yml b/docs/openapi-docs/src/test/resources/expected_nullable_option_field.yml index d544431302..ae40c7a737 100644 --- a/docs/openapi-docs/src/test/resources/expected_nullable_option_field.yml +++ b/docs/openapi-docs/src/test/resources/expected_nullable_option_field.yml @@ -28,6 +28,7 @@ paths: components: schemas: ClassWithOptionField: + title: ClassWithOptionField required: - requiredStringField type: object diff --git a/docs/openapi-docs/src/test/resources/expected_nullable_option_field_303.yml b/docs/openapi-docs/src/test/resources/expected_nullable_option_field_303.yml index c238af711c..54a8fd620b 100644 --- a/docs/openapi-docs/src/test/resources/expected_nullable_option_field_303.yml +++ b/docs/openapi-docs/src/test/resources/expected_nullable_option_field_303.yml @@ -28,6 +28,7 @@ paths: components: schemas: ClassWithOptionField: + title: ClassWithOptionField required: - requiredStringField type: object diff --git a/docs/openapi-docs/src/test/resources/expected_recursive.yml b/docs/openapi-docs/src/test/resources/expected_recursive.yml index 4031fcd507..e89db03668 100644 --- a/docs/openapi-docs/src/test/resources/expected_recursive.yml +++ b/docs/openapi-docs/src/test/resources/expected_recursive.yml @@ -16,6 +16,7 @@ paths: components: schemas: F1: + title: F1 type: object properties: data: diff --git a/docs/openapi-docs/src/test/resources/expected_same_fullnames.yml b/docs/openapi-docs/src/test/resources/expected_same_fullnames.yml index 833c2125cb..cf8f1fca5c 100644 --- a/docs/openapi-docs/src/test/resources/expected_same_fullnames.yml +++ b/docs/openapi-docs/src/test/resources/expected_same_fullnames.yml @@ -28,6 +28,7 @@ paths: components: schemas: Pet: + title: Pet required: - name type: object @@ -35,6 +36,7 @@ components: name: type: string Pet1: + title: Pet required: - legsCount type: object diff --git a/docs/openapi-docs/src/test/resources/expected_type_and_description_for_circe_json.yml b/docs/openapi-docs/src/test/resources/expected_type_and_description_for_circe_json.yml index d13ae98740..6ab3f916ec 100644 --- a/docs/openapi-docs/src/test/resources/expected_type_and_description_for_circe_json.yml +++ b/docs/openapi-docs/src/test/resources/expected_type_and_description_for_circe_json.yml @@ -24,6 +24,7 @@ paths: components: schemas: ExampleMessageIn: + title: ExampleMessageIn type: object properties: maybeJson: diff --git a/docs/openapi-docs/src/test/resources/expected_unfolded_array.yml b/docs/openapi-docs/src/test/resources/expected_unfolded_array.yml index 5f5464beed..a54e0a7504 100644 --- a/docs/openapi-docs/src/test/resources/expected_unfolded_array.yml +++ b/docs/openapi-docs/src/test/resources/expected_unfolded_array.yml @@ -30,6 +30,7 @@ paths: components: schemas: FruitAmount: + title: FruitAmount required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/expected_unfolded_array_unfolded_object.yml b/docs/openapi-docs/src/test/resources/expected_unfolded_array_unfolded_object.yml index 6658e61da6..dabfd16fa7 100644 --- a/docs/openapi-docs/src/test/resources/expected_unfolded_array_unfolded_object.yml +++ b/docs/openapi-docs/src/test/resources/expected_unfolded_array_unfolded_object.yml @@ -16,6 +16,7 @@ paths: components: schemas: FruitAmount: + title: FruitAmount required: - fruit - amount @@ -27,6 +28,7 @@ components: type: integer format: int32 ObjectWithList: + title: ObjectWithList type: object properties: data: diff --git a/docs/openapi-docs/src/test/resources/expected_unfolded_hierarchy.yml b/docs/openapi-docs/src/test/resources/expected_unfolded_hierarchy.yml index a8f370577f..36a870bba2 100644 --- a/docs/openapi-docs/src/test/resources/expected_unfolded_hierarchy.yml +++ b/docs/openapi-docs/src/test/resources/expected_unfolded_hierarchy.yml @@ -28,6 +28,7 @@ paths: components: schemas: Author: + title: Author required: - name - country @@ -38,6 +39,7 @@ components: country: $ref: '#/components/schemas/Country' Book: + title: Book required: - title - genre @@ -55,6 +57,7 @@ components: author: $ref: '#/components/schemas/Author' Country: + title: Country required: - name type: object @@ -62,6 +65,7 @@ components: name: type: string Genre: + title: Genre required: - name - description diff --git a/docs/openapi-docs/src/test/resources/expected_unfolded_object_unfolded_array.yml b/docs/openapi-docs/src/test/resources/expected_unfolded_object_unfolded_array.yml index 44a8f9acb1..70bbcf9992 100644 --- a/docs/openapi-docs/src/test/resources/expected_unfolded_object_unfolded_array.yml +++ b/docs/openapi-docs/src/test/resources/expected_unfolded_object_unfolded_array.yml @@ -18,6 +18,7 @@ paths: components: schemas: FruitAmount: + title: FruitAmount required: - fruit - amount @@ -29,6 +30,7 @@ components: type: integer format: int32 ObjectWrapper: + title: ObjectWrapper required: - value type: object diff --git a/docs/openapi-docs/src/test/resources/expected_unfolded_option.yml b/docs/openapi-docs/src/test/resources/expected_unfolded_option.yml index 80433b959c..7e675e53da 100644 --- a/docs/openapi-docs/src/test/resources/expected_unfolded_option.yml +++ b/docs/openapi-docs/src/test/resources/expected_unfolded_option.yml @@ -24,6 +24,7 @@ paths: components: schemas: FruitAmount: + title: FruitAmount required: - fruit - amount @@ -35,6 +36,7 @@ components: type: integer format: int32 ObjectWithOption: + title: ObjectWithOption type: object properties: data: diff --git a/docs/openapi-docs/src/test/resources/expected_unfolded_option_description.yml b/docs/openapi-docs/src/test/resources/expected_unfolded_option_description.yml index 2505101f65..33844455f6 100644 --- a/docs/openapi-docs/src/test/resources/expected_unfolded_option_description.yml +++ b/docs/openapi-docs/src/test/resources/expected_unfolded_option_description.yml @@ -24,6 +24,7 @@ paths: components: schemas: FruitAmount: + title: FruitAmount required: - fruit - amount @@ -36,6 +37,7 @@ components: format: int32 description: Amount of fruits ObjectWithOption: + title: ObjectWithOption type: object properties: data: diff --git a/docs/openapi-docs/src/test/resources/multi_customise_schema/expected_deprecated_array_field.yml b/docs/openapi-docs/src/test/resources/multi_customise_schema/expected_deprecated_array_field.yml index 7536efe785..860dfcf6df 100644 --- a/docs/openapi-docs/src/test/resources/multi_customise_schema/expected_deprecated_array_field.yml +++ b/docs/openapi-docs/src/test/resources/multi_customise_schema/expected_deprecated_array_field.yml @@ -24,6 +24,7 @@ paths: components: schemas: Data1: + title: Data1 required: - x type: object @@ -31,6 +32,7 @@ components: x: type: string HasCollectionDeprecated: + title: HasCollectionDeprecated type: object properties: field1: diff --git a/docs/openapi-docs/src/test/resources/multi_customise_schema/expected_deprecated_optional_field.yml b/docs/openapi-docs/src/test/resources/multi_customise_schema/expected_deprecated_optional_field.yml index 550fbf8477..e61c05f2f6 100644 --- a/docs/openapi-docs/src/test/resources/multi_customise_schema/expected_deprecated_optional_field.yml +++ b/docs/openapi-docs/src/test/resources/multi_customise_schema/expected_deprecated_optional_field.yml @@ -24,6 +24,7 @@ paths: components: schemas: Data1: + title: Data1 required: - x type: object @@ -31,6 +32,7 @@ components: x: type: string HasOptionalDeprecated: + title: HasOptionalDeprecated required: - field1 type: object diff --git a/docs/openapi-docs/src/test/resources/multi_customise_schema/inlined.yml b/docs/openapi-docs/src/test/resources/multi_customise_schema/inlined.yml index e893d477f4..7c11827bdb 100644 --- a/docs/openapi-docs/src/test/resources/multi_customise_schema/inlined.yml +++ b/docs/openapi-docs/src/test/resources/multi_customise_schema/inlined.yml @@ -24,6 +24,7 @@ paths: components: schemas: Data2: + title: Data2 required: - a - b diff --git a/docs/openapi-docs/src/test/resources/multi_customise_schema/nested_body.yml b/docs/openapi-docs/src/test/resources/multi_customise_schema/nested_body.yml index 97b62bf64a..4b21afa9f9 100644 --- a/docs/openapi-docs/src/test/resources/multi_customise_schema/nested_body.yml +++ b/docs/openapi-docs/src/test/resources/multi_customise_schema/nested_body.yml @@ -24,6 +24,7 @@ paths: components: schemas: Data1: + title: Data1 required: - x type: object @@ -31,6 +32,7 @@ components: x: type: string Data2: + title: Data2 required: - a - b diff --git a/docs/openapi-docs/src/test/resources/multi_customise_schema/top_level_body.yml b/docs/openapi-docs/src/test/resources/multi_customise_schema/top_level_body.yml index 8000f4345e..cffd34d79b 100644 --- a/docs/openapi-docs/src/test/resources/multi_customise_schema/top_level_body.yml +++ b/docs/openapi-docs/src/test/resources/multi_customise_schema/top_level_body.yml @@ -30,6 +30,7 @@ paths: components: schemas: Data1: + title: Data1 required: - x type: object diff --git a/docs/openapi-docs/src/test/resources/oneOf/expected_multiple_media_types_common_schema.yml b/docs/openapi-docs/src/test/resources/oneOf/expected_multiple_media_types_common_schema.yml index f1e3876d9e..39bcd7f456 100644 --- a/docs/openapi-docs/src/test/resources/oneOf/expected_multiple_media_types_common_schema.yml +++ b/docs/openapi-docs/src/test/resources/oneOf/expected_multiple_media_types_common_schema.yml @@ -34,6 +34,7 @@ paths: components: schemas: Organization: + title: Organization required: - name type: object diff --git a/docs/openapi-docs/src/test/resources/oneOf/expected_multiple_media_types_different_schema.yml b/docs/openapi-docs/src/test/resources/oneOf/expected_multiple_media_types_different_schema.yml index e5322307e5..ed1a7cde63 100644 --- a/docs/openapi-docs/src/test/resources/oneOf/expected_multiple_media_types_different_schema.yml +++ b/docs/openapi-docs/src/test/resources/oneOf/expected_multiple_media_types_different_schema.yml @@ -31,6 +31,7 @@ paths: components: schemas: Organization: + title: Organization required: - name type: object @@ -38,6 +39,7 @@ components: name: type: string Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/oneOf/expected_status_codes.yml b/docs/openapi-docs/src/test/resources/oneOf/expected_status_codes.yml index f0eb589413..439e430e3b 100644 --- a/docs/openapi-docs/src/test/resources/oneOf/expected_status_codes.yml +++ b/docs/openapi-docs/src/test/resources/oneOf/expected_status_codes.yml @@ -30,6 +30,7 @@ paths: components: schemas: NotFound: + title: NotFound required: - what type: object @@ -37,6 +38,7 @@ components: what: type: string Unauthorized: + title: Unauthorized required: - realm type: object @@ -44,6 +46,7 @@ components: realm: type: string Unknown: + title: Unknown required: - code - msg diff --git a/docs/openapi-docs/src/test/resources/oneOf/expected_the_same_status_codes.yml b/docs/openapi-docs/src/test/resources/oneOf/expected_the_same_status_codes.yml index 9dc5273a70..b61e9d767a 100644 --- a/docs/openapi-docs/src/test/resources/oneOf/expected_the_same_status_codes.yml +++ b/docs/openapi-docs/src/test/resources/oneOf/expected_the_same_status_codes.yml @@ -25,6 +25,7 @@ paths: components: schemas: NotFound: + title: NotFound required: - what type: object @@ -32,6 +33,7 @@ components: what: type: string Unknown: + title: Unknown required: - code - msg diff --git a/docs/openapi-docs/src/test/resources/oneOfBody/expected_in_json_text_range.yml b/docs/openapi-docs/src/test/resources/oneOfBody/expected_in_json_text_range.yml index 4622ceb110..aace6d1060 100644 --- a/docs/openapi-docs/src/test/resources/oneOfBody/expected_in_json_text_range.yml +++ b/docs/openapi-docs/src/test/resources/oneOfBody/expected_in_json_text_range.yml @@ -31,6 +31,7 @@ paths: components: schemas: Fruit: + title: Fruit required: - f type: object diff --git a/docs/openapi-docs/src/test/resources/oneOfBody/expected_in_json_xml_text.yml b/docs/openapi-docs/src/test/resources/oneOfBody/expected_in_json_xml_text.yml index 7e53fe89f8..bec1c32e10 100644 --- a/docs/openapi-docs/src/test/resources/oneOfBody/expected_in_json_xml_text.yml +++ b/docs/openapi-docs/src/test/resources/oneOfBody/expected_in_json_xml_text.yml @@ -34,6 +34,7 @@ paths: components: schemas: Fruit: + title: Fruit required: - f type: object diff --git a/docs/openapi-docs/src/test/resources/oneOfBody/expected_out_json_xml_text.yml b/docs/openapi-docs/src/test/resources/oneOfBody/expected_out_json_xml_text.yml index e4970e7c7c..5903bf1afd 100644 --- a/docs/openapi-docs/src/test/resources/oneOfBody/expected_out_json_xml_text.yml +++ b/docs/openapi-docs/src/test/resources/oneOfBody/expected_out_json_xml_text.yml @@ -34,6 +34,7 @@ paths: components: schemas: Fruit: + title: Fruit required: - f type: object diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_additional_properties.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_additional_properties.yml index ffced63c4e..a3155c0b08 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_additional_properties.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_additional_properties.yml @@ -24,10 +24,12 @@ paths: components: schemas: Map_ValidFruitAmount: + title: Map_ValidFruitAmount type: object additionalProperties: $ref: '#/components/schemas/ValidFruitAmount' ValidFruitAmount: + title: ValidFruitAmount required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_body_collection.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_body_collection.yml index 57907a7dda..2fbd01a049 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_body_collection.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_body_collection.yml @@ -24,6 +24,7 @@ paths: components: schemas: BasketOfFruits: + title: BasketOfFruits type: object properties: fruits: @@ -32,6 +33,7 @@ components: $ref: '#/components/schemas/ValidFruitAmount' minItems: 1 ValidFruitAmount: + title: ValidFruitAmount required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_body_enum.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_body_enum.yml index 93cfad9fab..152e61a00f 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_body_enum.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_body_enum.yml @@ -24,11 +24,13 @@ paths: components: schemas: Color: + title: Color type: string enum: - blue - red ColorWrapper: + title: ColorWrapper required: - color type: object diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_body_wrapped.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_body_wrapped.yml index 7fadd13b9e..bfbf0a06a4 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_body_wrapped.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_body_wrapped.yml @@ -24,6 +24,7 @@ paths: components: schemas: ValidFruitAmount: + title: ValidFruitAmount required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_coproduct.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_coproduct.yml index ed2bc89b1a..b5b32c6fda 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_coproduct.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_coproduct.yml @@ -16,10 +16,12 @@ paths: components: schemas: Entity: + title: Entity oneOf: - $ref: '#/components/schemas/Organization' - $ref: '#/components/schemas/Person' Organization: + title: Organization required: - name type: object @@ -27,6 +29,7 @@ components: name: type: string Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_enum_class.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_enum_class.yml index f83c9ad3a8..a548de5066 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_enum_class.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_enum_class.yml @@ -24,6 +24,7 @@ paths: components: schemas: Color: + title: Color type: string enum: - blue diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_enum_class_wrapped_in_option.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_enum_class_wrapped_in_option.yml index b29ead5821..26d166c97f 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_enum_class_wrapped_in_option.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_enum_class_wrapped_in_option.yml @@ -24,6 +24,7 @@ paths: components: schemas: Color: + title: Color type: string enum: - blue diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_enum_object.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_enum_object.yml index 3c7bbce2bf..9d1583e7e0 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_enum_object.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_enum_object.yml @@ -16,6 +16,7 @@ paths: components: schemas: ColorValue: + title: ColorValue required: - color - value diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_enumeratum.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_enumeratum.yml index 8409a5c6b1..c16ac407ef 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_enumeratum.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_enumeratum.yml @@ -16,11 +16,13 @@ paths: components: schemas: FruitType: + title: FruitType type: string enum: - APPLE - PEAR FruitWithEnum: + title: FruitWithEnum required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_enumeratum_with_metadata.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_enumeratum_with_metadata.yml index 4fc5913209..82d3e328d8 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_enumeratum_with_metadata.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_enumeratum_with_metadata.yml @@ -24,6 +24,7 @@ paths: components: schemas: MyNumber: + title: MyNumber type: integer description: |- * 1 - One @@ -35,6 +36,7 @@ components: - 2 - 3 NumberWithMsg: + title: NumberWithMsg required: - number - msg diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_modified_array_objects.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_modified_array_objects.yml index 36bcce3b34..42cce38514 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_modified_array_objects.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_modified_array_objects.yml @@ -16,6 +16,7 @@ paths: components: schemas: FruitAmount: + title: FruitAmount required: - fruit - amount @@ -27,6 +28,7 @@ components: type: integer format: int32 ObjectWithList: + title: ObjectWithList type: object properties: data: diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_modified_array_strings.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_modified_array_strings.yml index 861e6d6f36..c547a5b894 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_modified_array_strings.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_modified_array_strings.yml @@ -16,6 +16,7 @@ paths: components: schemas: ObjectWithStrings: + title: ObjectWithStrings type: object properties: data: diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_optional_body_wrapped.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_optional_body_wrapped.yml index b43fb8b48c..de4fcd3e03 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_optional_body_wrapped.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_optional_body_wrapped.yml @@ -24,6 +24,7 @@ paths: components: schemas: ValidFruitAmount: + title: ValidFruitAmount required: - fruit - amount diff --git a/docs/openapi-docs/src/test/resources/validator/expected_valid_optional_coproduct.yml b/docs/openapi-docs/src/test/resources/validator/expected_valid_optional_coproduct.yml index 1ea8c3b9ff..aabe68f0f5 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_valid_optional_coproduct.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_valid_optional_coproduct.yml @@ -24,10 +24,12 @@ paths: components: schemas: Entity: + title: Entity oneOf: - $ref: '#/components/schemas/Organization' - $ref: '#/components/schemas/Person' Organization: + title: Organization required: - name type: object @@ -35,6 +37,7 @@ components: name: type: string Person: + title: Person required: - name - age diff --git a/docs/openapi-docs/src/test/resources/validator/expected_validator_with_custom_naming.yml b/docs/openapi-docs/src/test/resources/validator/expected_validator_with_custom_naming.yml index 91951dc875..3d73377fec 100644 --- a/docs/openapi-docs/src/test/resources/validator/expected_validator_with_custom_naming.yml +++ b/docs/openapi-docs/src/test/resources/validator/expected_validator_with_custom_naming.yml @@ -24,6 +24,7 @@ paths: components: schemas: MyClass: + title: MyClass required: - my_attribute type: object