From 04a701b5d509f201584c26756aef41a1f5885844 Mon Sep 17 00:00:00 2001 From: Carsten Wickner Date: Fri, 21 Jun 2024 22:05:51 +0200 Subject: [PATCH] chore: clean up special characters in javadocs --- .../generator/InstanceAttributeOverride.java | 2 +- .../generator/InstanceAttributeOverrideV2.java | 2 +- .../github/victools/jsonschema/generator/Option.java | 10 +++++----- .../jsonschema/generator/SchemaGeneratorConfig.java | 2 +- .../generator/SchemaGeneratorConfigBuilder.java | 6 +++--- .../generator/SchemaGeneratorConfigPart.java | 4 ++-- .../generator/SchemaGeneratorGeneralConfigPart.java | 8 ++++---- .../jsonschema/generator/TypeAttributeOverride.java | 2 +- .../jsonschema/generator/TypeAttributeOverrideV2.java | 2 +- .../victools/jsonschema/generator/TypeContext.java | 2 +- .../victools/jsonschema/generator/TypeScope.java | 4 ++-- .../generator/impl/SchemaGenerationContextImpl.java | 2 +- .../jsonschema/generator/impl/module/EnumModule.java | 4 ++-- .../generator/impl/module/SimpleTypeModule.java | 2 +- .../module/jackson/JsonSubTypesResolver.java | 2 +- .../jsonschema/module/swagger15/SwaggerModule.java | 4 ++-- .../jsonschema/module/swagger2/Swagger2Module.java | 2 +- 17 files changed, 30 insertions(+), 30 deletions(-) diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/InstanceAttributeOverride.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/InstanceAttributeOverride.java index 0aece2a8..40a93102 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/InstanceAttributeOverride.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/InstanceAttributeOverride.java @@ -28,7 +28,7 @@ public interface InstanceAttributeOverride> extends InstanceAttributeOverrideV2 { /** - * Add/remove attributes on the given JSON Schema node – this is specifically intended for attributes relating to a particular instance. + * Add/remove attributes on the given JSON Schema node - this is specifically intended for attributes relating to a particular instance. *
* E.g. {@link SchemaKeyword#TAG_DESCRIPTION}, {@link SchemaKeyword#TAG_MINIMUM}, {@link SchemaKeyword#TAG_MAXIMUM_EXCLUSIVE} * diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/InstanceAttributeOverrideV2.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/InstanceAttributeOverrideV2.java index 14467228..6eae9e48 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/InstanceAttributeOverrideV2.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/InstanceAttributeOverrideV2.java @@ -27,7 +27,7 @@ public interface InstanceAttributeOverrideV2> extends StatefulConfig { /** - * Add/remove attributes on the given JSON Schema node – this is specifically intended for attributes relating to a particular instance. + * Add/remove attributes on the given JSON Schema node - this is specifically intended for attributes relating to a particular instance. *
* E.g. {@link SchemaKeyword#TAG_DESCRIPTION}, {@link SchemaKeyword#TAG_MINIMUM}, {@link SchemaKeyword#TAG_MAXIMUM_EXCLUSIVE} * diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/Option.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/Option.java index 6ccbf912..cef08dee 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/Option.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/Option.java @@ -55,7 +55,7 @@ public enum Option { */ SIMPLIFIED_ENUMS(EnumModule::asObjects, null), /** - * Whether enums should be treated as plain {@link SchemaKeyword#TAG_TYPE_STRING} values – derived from their respective constant name. + * Whether enums should be treated as plain {@link SchemaKeyword#TAG_TYPE_STRING} values - derived from their respective constant name. *
* This only takes effect if {@link Option#FLATTENED_ENUMS_FROM_TOSTRING} is disabled but takes priority over {@link Option#SIMPLIFIED_ENUMS}. * @@ -64,7 +64,7 @@ public enum Option { */ FLATTENED_ENUMS(EnumModule::asStringsFromName, null, Option.SIMPLIFIED_ENUMS), /** - * Whether enums should be treated as plain {@link SchemaKeyword#TAG_TYPE_STRING} values – derived from their respective {@code toString()}. + * Whether enums should be treated as plain {@link SchemaKeyword#TAG_TYPE_STRING} values - derived from their respective {@code toString()}. *
* This takes priority over both {@link Option#FLATTENED_ENUMS} and {@link Option#SIMPLIFIED_ENUMS}. * @@ -241,11 +241,11 @@ public enum Option { /** * Whether all referenced objects should be listed in the schema's "definitions"/"$defs". *
- * Without this option, only those subschemas will be "$ref"-erenced if they occur more than once – in-lining everything else. + * Without this option, only those subschemas will be "$ref"-erenced if they occur more than once - in-lining everything else. */ DEFINITIONS_FOR_ALL_OBJECTS(null, null), /** - * Whether the schema for the target/main type should be included in the "definitions"/"$defs" – thereby avoiding an potential {@code "$ref": "#"} + * Whether the schema for the target/main type should be included in the "definitions"/"$defs" - thereby avoiding an potential {@code "$ref": "#"} * and assigning a name to it like for all other defined subschemas. *
* Otherwise, "$ref"-erences to the main/target schema will use the empty fragment ("#") and it will not be listed in the "definitions"/"$defs". @@ -259,7 +259,7 @@ public enum Option { DEFINITION_FOR_MAIN_SCHEMA(null, null), /** * Whether a member (field/method), having a declared type for which subtypes are being detected, should be included as standalone definition with - * any collected member attributes assigned directly – and the subtypes only being handled as generic types – or each of its subtypes should be + * any collected member attributes assigned directly - and the subtypes only being handled as generic types - or each of its subtypes should be * treated as alternative sub-schema for this member (field/method) including any attributes derived from that member. *
* Warning: this should only be enabled if there are no relevant annotations (e.g. like jackson {@code @JsonTypeInfo}) on individual properties, diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfig.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfig.java index de98d869..c0de2381 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfig.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfig.java @@ -69,7 +69,7 @@ public interface SchemaGeneratorConfig extends StatefulConfig { /** * Determine whether a member (field/method), having a declared type for which subtypes are being detected, should be merely a collection of its - * subtype schemas – each being treated like the member had declared the subtype directly – or whether it should be included as standalone + * subtype schemas - each being treated like the member had declared the subtype directly - or whether it should be included as standalone * definition with any collected member attributes assigned directly and the subtypes only being handled as generic types. * * @return whether to produce sub-schema for each subtype of a member's declared type, like the member had declared that subtype instead diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfigBuilder.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfigBuilder.java index 07a7d157..194d6e5a 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfigBuilder.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfigBuilder.java @@ -229,7 +229,7 @@ public SchemaGeneratorConfigBuilder with(Module module) { } /** - * Adding a custom schema provider – if it returns null for a given type, the next definition provider will be applied. + * Adding a custom schema provider - if it returns null for a given type, the next definition provider will be applied. *
* If all custom schema providers return null (or there is none), then the standard behaviour applies. * @@ -244,9 +244,9 @@ public SchemaGeneratorConfigBuilder with(CustomDefinitionProviderV2 definitionPr } /** - * Adding an override for type attributes – all of the registered overrides will be applied in the order of having been added. + * Adding an override for type attributes - all the registered overrides will be applied in the order of having been added. * - * @param override adding/removing attributes on a JSON Schema node – specifically intended for attributes relating to the type in general. + * @param override adding/removing attributes on a JSON Schema node - specifically intended for attributes relating to the type in general. * @return this builder instance (for chaining) * @deprecated use {@link SchemaGeneratorGeneralConfigPart#withTypeAttributeOverride(TypeAttributeOverrideV2)} instead */ diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfigPart.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfigPart.java index a52123a6..a92d64d2 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfigPart.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfigPart.java @@ -61,7 +61,7 @@ public class SchemaGeneratorConfigPart> extends Sche private final List> propertyNameOverrideResolvers = new ArrayList<>(); /** - * Adding a custom schema provider – if it returns null for a given type, the next definition provider will be applied. + * Adding a custom schema provider - if it returns null for a given type, the next definition provider will be applied. *
* If all custom property schema providers return null (or there is none), then the general type custom schema providers apply. * @@ -126,7 +126,7 @@ public SchemaGeneratorConfigPart withIgnoreCheck(Predicate check) { } /** - * Determine whether a given member should be included – ignoring member if any inclusion check returns false. + * Determine whether a given member should be included - ignoring member if any inclusion check returns false. * * @param member member to check * @return whether the member should be ignored (defaults to false) diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorGeneralConfigPart.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorGeneralConfigPart.java index 1ef1008a..d091c4f4 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorGeneralConfigPart.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorGeneralConfigPart.java @@ -87,7 +87,7 @@ public SchemaDefinitionNamingStrategy getDefinitionNamingStrategy() { } /** - * Adding a custom schema provider – if it returns null for a given type, the next definition provider will be applied. + * Adding a custom schema provider - if it returns null for a given type, the next definition provider will be applied. *
* If all custom schema providers return null (or there is none), then the standard behaviour applies. * @@ -109,7 +109,7 @@ public List getCustomDefinitionProviders() { } /** - * Adding a subtype resolver – if it returns null for a given type, the next subtype resolver will be applied. + * Adding a subtype resolver - if it returns null for a given type, the next subtype resolver will be applied. *
* If all subtype resolvers return null, there is none or a resolver returns an empty list, then the standard behaviour applies. * @@ -131,9 +131,9 @@ public List getSubtypeResolvers() { } /** - * Adding an override for type attributes – all of the registered overrides will be applied in the order of having been added. + * Adding an override for type attributes - all the registered overrides will be applied in the order of having been added. * - * @param override adding/removing attributes on a JSON Schema node – specifically intended for attributes relating to the type in general. + * @param override adding/removing attributes on a JSON Schema node - specifically intended for attributes relating to the type in general. * @return this builder instance (for chaining) */ public SchemaGeneratorGeneralConfigPart withTypeAttributeOverride(TypeAttributeOverrideV2 override) { diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeAttributeOverride.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeAttributeOverride.java index ba62c850..e7cae9d2 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeAttributeOverride.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeAttributeOverride.java @@ -27,7 +27,7 @@ public interface TypeAttributeOverride extends TypeAttributeOverrideV2 { /** - * Add/remove attributes on the given JSON Schema node – this is specifically intended for attributes relating to the type in general. + * Add/remove attributes on the given JSON Schema node - this is specifically intended for attributes relating to the type in general. *
* E.g. {@link SchemaKeyword#TAG_FORMAT}, {@link SchemaKeyword#TAG_PATTERN}, {@link SchemaKeyword#TAG_REQUIRED} * diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeAttributeOverrideV2.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeAttributeOverrideV2.java index 261f0fe2..ff71f1ba 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeAttributeOverrideV2.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeAttributeOverrideV2.java @@ -25,7 +25,7 @@ public interface TypeAttributeOverrideV2 extends StatefulConfig { /** - * Add/remove attributes on the given JSON Schema node – this is specifically intended for attributes relating to the type in general. + * Add/remove attributes on the given JSON Schema node - this is specifically intended for attributes relating to the type in general. *
* E.g. {@link SchemaKeyword#TAG_FORMAT}, {@link SchemaKeyword#TAG_PATTERN}, {@link SchemaKeyword#TAG_REQUIRED} * diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeContext.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeContext.java index 5ffc95ca..d07c2488 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeContext.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeContext.java @@ -428,7 +428,7 @@ public A getTypeAnnotationConsideringHierarchy(ResolvedTy /** * Constructing a string that represents the given type (including possible type parameters and their actual types). *
- * This calls {@link Class#getSimpleName()} for a single erased type – i.e. excluding package names. + * This calls {@link Class#getSimpleName()} for a single erased type - i.e. excluding package names. * * @param type the type to represent * @return resulting string diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeScope.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeScope.java index 82b11727..61bd0941 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeScope.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/TypeScope.java @@ -95,7 +95,7 @@ public ResolvedType getContainerItemType() { } /** - * Constructing a string that represents this member's type (including possible type parameters and their actual types) – excluding package names. + * Constructing a string that represents this member's type (including possible type parameters and their actual types) - excluding package names. *
* This is equivalent to calling: {@code scope.getContext().getSimpleTypeDescription(scope.getType())} * @@ -109,7 +109,7 @@ public String getSimpleTypeDescription() { } /** - * Constructing a string that represents this member's type (including possible type parameters and their actual types) – including package names. + * Constructing a string that represents this member's type (including possible type parameters and their actual types) - including package names. *
* This is equivalent to calling: {@code scope.getContext().getFullTypeDescription(scope.getType())} * diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaGenerationContextImpl.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaGenerationContextImpl.java index a497745b..93ccca20 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaGenerationContextImpl.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaGenerationContextImpl.java @@ -403,7 +403,7 @@ private boolean addSubtypeReferencesInDefinition(ResolvedType targetType, Object * Collect the specified value(s) from the given definition's {@link SchemaKeyword#TAG_TYPE} attribute. * * @param definition type definition to extract specified {@link SchemaKeyword#TAG_TYPE} values from - * @return extracted {@link SchemaKeyword#TAG_TYPE} – values (may be empty) + * @return extracted {@link SchemaKeyword#TAG_TYPE} - values (may be empty) */ private Set collectAllowedSchemaTypes(ObjectNode definition) { JsonNode declaredTypes = definition.get(this.getKeyword(SchemaKeyword.TAG_TYPE)); diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/EnumModule.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/EnumModule.java index 3054aa79..559e5942 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/EnumModule.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/EnumModule.java @@ -69,7 +69,7 @@ public static EnumModule asObjects() { /** * Constructor remembering whether to treat enums as plain strings or as objects. * - * @param enumConstantToString how to derive a plain string representation from an enum constant value, may be null to treat them as objects + * @param enumConstantToString how to derive a plain string representation from an enum constant value, may be null to treat them as objects */ public EnumModule(Function, String> enumConstantToString) { this.enumConstantToString = enumConstantToString; @@ -112,7 +112,7 @@ private static List extractEnumValues(MethodScope method) { * Look-up the given enum type's constant values. * * @param enumType targeted enum type - * @param enumConstantToString how to derive a plain string representation from an enum constant value + * @param enumConstantToString how to derive a plain string representation from an enum constant value * @return collection containing constant enum values */ private static List extractEnumValues(ResolvedType enumType, Function, String> enumConstantToString) { diff --git a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/SimpleTypeModule.java b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/SimpleTypeModule.java index 6d0f6585..23af6bbb 100644 --- a/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/SimpleTypeModule.java +++ b/jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/module/SimpleTypeModule.java @@ -232,7 +232,7 @@ public final SimpleTypeModule withNumberType(Class javaType, String openApiFo } /** - * Determine whether a given type is nullable – returning false if the type refers to a primitive type. + * Determine whether a given type is nullable - returning false if the type refers to a primitive type. * * @param fieldOrMethod reference to the method/field (which is being ignored here) * @return false if type is a primitive, otherwise null diff --git a/jsonschema-module-jackson/src/main/java/com/github/victools/jsonschema/module/jackson/JsonSubTypesResolver.java b/jsonschema-module-jackson/src/main/java/com/github/victools/jsonschema/module/jackson/JsonSubTypesResolver.java index 8aa92769..e2e04535 100644 --- a/jsonschema-module-jackson/src/main/java/com/github/victools/jsonschema/module/jackson/JsonSubTypesResolver.java +++ b/jsonschema-module-jackson/src/main/java/com/github/victools/jsonschema/module/jackson/JsonSubTypesResolver.java @@ -146,7 +146,7 @@ public List lookUpSubtypesFromAnnotation(ResolvedType declaredType /** * Safe way of resolving an erased subtype from its supertype. If the subtype introduces generic parameters not present on the supertype, the - * subtype will be resolved without any type parameters – for simplicity's sake not even the ones declared alongside the supertype then. + * subtype will be resolved without any type parameters - for simplicity's sake not even the ones declared alongside the supertype then. * * @param declaredType supertype encountered while generating a schema * @param annotatedSubtype single subtype declared via {@link JsonSubTypes} on the super class diff --git a/jsonschema-module-swagger-1.5/src/main/java/com/github/victools/jsonschema/module/swagger15/SwaggerModule.java b/jsonschema-module-swagger-1.5/src/main/java/com/github/victools/jsonschema/module/swagger15/SwaggerModule.java index b3064407..48a3a10f 100644 --- a/jsonschema-module-swagger-1.5/src/main/java/com/github/victools/jsonschema/module/swagger15/SwaggerModule.java +++ b/jsonschema-module-swagger-1.5/src/main/java/com/github/victools/jsonschema/module/swagger15/SwaggerModule.java @@ -33,7 +33,7 @@ import java.util.regex.Pattern; /** - * JSON Schema Generator Module – Swagger (1.5). + * JSON Schema Generator Module - Swagger (1.5). */ public class SwaggerModule implements Module { @@ -76,7 +76,7 @@ public void applyToConfigBuilder(SchemaGeneratorConfigBuilder builder) { } /** - * Apply configurations that are part of this module to the given configuration part – expectation being that fields and methods get the same. + * Apply configurations that are part of this module to the given configuration part - expectation being that fields and methods get the same. * * @param configPart configuration instance to add configurations too */ diff --git a/jsonschema-module-swagger-2/src/main/java/com/github/victools/jsonschema/module/swagger2/Swagger2Module.java b/jsonschema-module-swagger-2/src/main/java/com/github/victools/jsonschema/module/swagger2/Swagger2Module.java index 0085911e..103d20aa 100644 --- a/jsonschema-module-swagger-2/src/main/java/com/github/victools/jsonschema/module/swagger2/Swagger2Module.java +++ b/jsonschema-module-swagger-2/src/main/java/com/github/victools/jsonschema/module/swagger2/Swagger2Module.java @@ -46,7 +46,7 @@ import java.util.stream.Stream; /** - * JSON Schema Generator Module – Swagger (2.x). + * JSON Schema Generator Module - Swagger (2.x). * * @since 4.13.0 */