Skip to content

Commit

Permalink
chore: clean up special characters in javadocs
Browse files Browse the repository at this point in the history
CarstenWickner committed Jun 21, 2024

Verified

This commit was signed with the committer’s verified signature.
wwills2 William "Zan" Wills
1 parent ca35660 commit 04a701b
Showing 17 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
public interface InstanceAttributeOverride<M extends MemberScope<?, ?>> extends InstanceAttributeOverrideV2<M> {

/**
* 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.
* <br>
* E.g. {@link SchemaKeyword#TAG_DESCRIPTION}, {@link SchemaKeyword#TAG_MINIMUM}, {@link SchemaKeyword#TAG_MAXIMUM_EXCLUSIVE}
*
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
public interface InstanceAttributeOverrideV2<M extends MemberScope<?, ?>> 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.
* <br>
* E.g. {@link SchemaKeyword#TAG_DESCRIPTION}, {@link SchemaKeyword#TAG_MINIMUM}, {@link SchemaKeyword#TAG_MAXIMUM_EXCLUSIVE}
*
Original file line number Diff line number Diff line change
@@ -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.
* <br>
* 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()}.
* <br>
* 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".
* <br>
* 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.
* <br>
* 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.
* <br>
* Warning: this should only be enabled if there are no relevant annotations (e.g. like jackson {@code @JsonTypeInfo}) on individual properties,
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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.
* <br>
* 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
*/
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ public class SchemaGeneratorConfigPart<M extends MemberScope<?, ?>> extends Sche
private final List<ConfigFunction<M, String>> 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.
* <br>
* 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<M> withIgnoreCheck(Predicate<M> 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)
Original file line number Diff line number Diff line change
@@ -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.
* <br>
* If all custom schema providers return null (or there is none), then the standard behaviour applies.
*
@@ -109,7 +109,7 @@ public List<CustomDefinitionProviderV2> 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.
* <br>
* 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<SubtypeResolver> 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) {
Original file line number Diff line number Diff line change
@@ -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.
* <br>
* E.g. {@link SchemaKeyword#TAG_FORMAT}, {@link SchemaKeyword#TAG_PATTERN}, {@link SchemaKeyword#TAG_REQUIRED}
*
Original file line number Diff line number Diff line change
@@ -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.
* <br>
* E.g. {@link SchemaKeyword#TAG_FORMAT}, {@link SchemaKeyword#TAG_PATTERN}, {@link SchemaKeyword#TAG_REQUIRED}
*
Original file line number Diff line number Diff line change
@@ -428,7 +428,7 @@ public <A extends Annotation> A getTypeAnnotationConsideringHierarchy(ResolvedTy
/**
* Constructing a string that represents the given type (including possible type parameters and their actual types).
* <br>
* 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
Original file line number Diff line number Diff line change
@@ -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.
* <br>
* 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.
* <br>
* This is equivalent to calling: {@code scope.getContext().getFullTypeDescription(scope.getType())}
*
Original file line number Diff line number Diff line change
@@ -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<String> collectAllowedSchemaTypes(ObjectNode definition) {
JsonNode declaredTypes = definition.get(this.getKeyword(SchemaKeyword.TAG_TYPE));
Original file line number Diff line number Diff line change
@@ -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<Enum<?>, String> enumConstantToString) {
this.enumConstantToString = enumConstantToString;
@@ -112,7 +112,7 @@ private static List<String> 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<String> extractEnumValues(ResolvedType enumType, Function<Enum<?>, String> enumConstantToString) {
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -146,7 +146,7 @@ public List<ResolvedType> 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
Original file line number Diff line number Diff line change
@@ -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
*/
Original file line number Diff line number Diff line change
@@ -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
*/

0 comments on commit 04a701b

Please sign in to comment.