Skip to content

Commit

Permalink
correct spelling, fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
naXa777 committed Jul 2, 2017
1 parent 271f2c0 commit 25e4375
Show file tree
Hide file tree
Showing 46 changed files with 114 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ code reviewer can focus on reviewing what has actually changed, without having t
context as to what the thought processes is or how you arrived at the final solution
- If you encounter significant cleanup required mid-way through your work try to isolate that as a separate commit.
This is not to say ever single minute cleanup needs to be in its own commit, just the large chunks of cleanup.
- Finally clean up all the merge commits by rebaseing against the source repo often.
- Finally clean up all the merge commits by rebasing against the source repo often.

Along the lines of the _agile manifesto_:

Expand Down
4 changes: 2 additions & 2 deletions docs/asciidoc/common-problems.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spring services can serve it up.

A. Thanks to https://github.com/chrishuttonch[@chrishuttonch] for describing the solution to https://github.com/springfox/springfox/issues/867[this issue]

TIP: I switched on the excludeFieldsWithoutExposeAnnotation() which meant that none of the objects would produce any data. To get around this I created several serialisers for the following classes:
TIP: I switched on the excludeFieldsWithoutExposeAnnotation() which meant that none of the objects would produce any data. To get around this I created several serializers for the following classes:

[source,java]
----
Expand Down Expand Up @@ -72,7 +72,7 @@ public class MyWebAutoConfiguration extends WebMvcConfigurerAdapter {
}
----

[[q5]]*Q. How do we use Java 8 types esply. LocalDateTime?*
[[q5]]*Q. How do we use Java 8 types easily. LocalDateTime?*

A. The easiest way to to configure dates is via `Docket#directModelSubstitute(LocalDateTime.class, String.class)`. If
these are ISO 8601 dates that conform to a string format i.e. `yyyy-MM-dd'T'HH:mm'Z'`. However you won't have any format or validation info.
Expand Down
4 changes: 2 additions & 2 deletions docs/asciidoc/current-documentation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ library always has a configured ObjectMapper that is customized to serialize swa

In order to do this implement the ```ApplicationListener<ObjectMapperConfigured>``` interface. The event has a handle
to the ObjectMapper that was configured. Configuring application specific ObjectMapper customizations in this
applicaiton event handler guarantees that application specific customizations will be applied to each and every
application event handler guarantees that application specific customizations will be applied to each and every
ObjectMapper that is in play.

If you encounter a NullPointerException during application startup like https://github.com/springfox/springfox/issues/635[this issue]. Its because most likely the ```WebMvcConfigurerAdapter``` isn't working.
Expand Down Expand Up @@ -299,7 +299,7 @@ public Model getAllThePets() {

===== Customizing the value of _operationId_

In the event you wish to overide the default `operationId` which Springfox renders, you may do so by providing the
In the event you wish to override the default `operationId` which Springfox renders, you may do so by providing the
`nickname` element in an `@ApiOperation` annotation.

====== Given this annotated method ...
Expand Down
4 changes: 2 additions & 2 deletions docs/asciidoc/extensibility.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ include::../../springfox-spring-config/src/main/java/springfox/springconfig/Vers
<2> Check if the https://github.com/springfox/springfox/blob/master/springfox-spring-config/src/main/java/springfox/springconfig/VersionApi.java[VersionApi]
is applied to the parameter.
<3> Build the parameter with the necessary information using the builder methods.
<4> Return true if we want this plugin to apply to all documenation types.
<4> Return true if we want this plugin to apply to all documentation types.

==== Example ApiListingScannerPlugin

Expand All @@ -108,7 +108,7 @@ include::../../swagger-contract-tests/src/main/java/springfox/test/contract/swag
<1> Add a list of custom ``ApiDescription``s
<2> Add a list of ``Operation``s for each description
<3> NOTE: the code generated names are not guaranteed to be unique. For these custom endpoints it is the
resposibility of the service author to ensure.
responsibility of the service author to ensure.
<4> NOTE: It is important to also ensure we pass in a model reference even for primitive types

== Additional extensibility options
Expand Down
2 changes: 1 addition & 1 deletion docs/asciidoc/legacy-documentation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ By default, when using Springfox in Swagger 2.0 mode, the value of `operationID`
```

===== Customizing the value of `operationId`
In the event you wish to overide the default `operationId` which Springfox renders, you may do so by providing the `nickname` element in an `@ApiOperation` annotation.
In the event you wish to override the default `operationId` which Springfox renders, you may do so by providing the `nickname` element in an `@ApiOperation` annotation.

====== Given this annotated method ...

Expand Down
4 changes: 2 additions & 2 deletions gradle/publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ if (!isSnapshot()) {
// mavenCentralSync {
// sync = true //Optional (true by default). Determines whether to sync the version to Maven Central.
// user = 'userToken' //OSS user token
// password = 'paasword' //OSS user password
// close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
// password = 'password' //OSS user password
// close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by putting 0 as value) and release the version manually.
// }
// }
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Apr 28 05:37:48 CDT 2017
#Sun Jul 02 12:52:46 MSK 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.type.TypeFactory
import spock.lang.Specification
import spock.lang.Unroll
import springfox.bean.validators.plugins.models.NullablityTestModel
import springfox.bean.validators.plugins.schema.NotNullAnnotationPlugin
import springfox.bean.validators.plugins.models.NullabilityTestModel
import springfox.documentation.builders.ModelPropertyBuilder
import springfox.documentation.spi.DocumentationType
import springfox.documentation.spi.schema.contexts.ModelPropertyContext
Expand All @@ -41,7 +40,7 @@ class ModelPropertyNotNullAnnotationPluginSpec extends Specification {
def "@NotNull annotations are reflected in the model properties that are AnnotatedElements"() {
given:
def sut = new NotNullAnnotationPlugin()
def element = NullablityTestModel.getDeclaredField(propertyName)
def element = NullabilityTestModel.getDeclaredField(propertyName)
def context = new ModelPropertyContext(
new ModelPropertyBuilder(),
element,
Expand Down Expand Up @@ -87,7 +86,7 @@ class ModelPropertyNotNullAnnotationPluginSpec extends Specification {
def mapper = new ObjectMapper()
mapper
.serializationConfig
.introspect(TypeFactory.defaultInstance().constructType(NullablityTestModel))
.introspect(TypeFactory.defaultInstance().constructType(NullabilityTestModel))
.findProperties()
.find { p -> property.equals(p.name) };
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import javax.validation.constraints.NotNull;

public class NullablityTestModel {
public class NullabilityTestModel {
@NotNull
private String notNullString;
private String string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public ApiListingBuilder protocols(Set<String> protocols) {
}

/**
* Updates the references to the security definitiosn
* Updates the references to the security definitions
*
* @param securityReferences - security definition references
* @return this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public ModelBuilder qualifiedType(String qualifiedType) {
/**
* Updates the model properties
*
* @param properties - map of properies by name
* @param properties - map of properties by name
* @return this
*/
public ModelBuilder properties(Map<String, ModelProperty> properties) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public OperationBuilder summary(String summary) {
/**
* Updates the operation notes
*
* @param notes - notes to describe the operaiton
* @return
* @param notes - notes to describe the operation
* @return this
*/
public OperationBuilder notes(String notes) {
this.notes = defaultIfAbsent(notes, this.notes);
Expand All @@ -112,7 +112,7 @@ public OperationBuilder uniqueId(String uniqueId) {
/**
* This is an optional override that provides a custom method name stem, such that the method name
* that is generated for the purposes of code-gen can be customized. However it must be kept in mind
* that in-order the guarantee uniqueness of the name for code-gen the algoritm will still try to
* that in-order the guarantee uniqueness of the name for code-gen the algorithm will still try to
* append and indexer at the end of it e.g. someMethod_1, someMethod_2 etc. to preserve uniqueness in
* the case there are duplicate names.
*
Expand Down Expand Up @@ -184,7 +184,7 @@ public OperationBuilder authorizations(List<SecurityReference> securityReference
* Updates the input parameters this operation needs
*
* @param parameters - input parameter definitions
* @return
* @return this
*/
public OperationBuilder parameters(final List<Parameter> parameters) {
List<Parameter> source = nullToEmptyList(parameters);
Expand Down Expand Up @@ -243,7 +243,7 @@ public OperationBuilder responseModel(ModelReference responseType) {
* Updates the tags that identify this operation
*
* @param tags - new set of tags
* @return
* @return this
*/
public OperationBuilder tags(Set<String> tags) {
this.tags = nullToEmptySet(tags);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public ParameterBuilder description(String description) {
}

/**
* Updates the default value of the parametr
* Updates the default value of the parameter
*
* @param defaultValue - default value
* @return this
Expand Down Expand Up @@ -126,7 +126,7 @@ public ParameterBuilder allowMultiple(boolean allowMultiple) {
*
* @param allowableValues - allowable values (instance of @see springfox.documentation.service.AllowableListValues
* or @see springfox.documentation.service.AllowableRangeValues)
* @return
* @return this
*/
public ParameterBuilder allowableValues(AllowableValues allowableValues) {
this.allowableValues = emptyToNull(allowableValues, this.allowableValues);
Expand Down Expand Up @@ -171,7 +171,7 @@ public ParameterBuilder type(ResolvedType type) {
* Consolidate or figure out whats can be rolled into the other.
*
* @param modelRef
* @return
* @return this
*/
public ParameterBuilder modelRef(ModelReference modelRef) {
this.modelRef = defaultIfAbsent(modelRef, this.modelRef);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public ResourceListingBuilder apis(List<ApiListingReference> apis) {
/**
* Updates the security definitions that protect this resource listing
*
* @param authorizations - security definitiosn
* @param authorizations - security definitions
* @return this
*/
public ResourceListingBuilder securitySchemes(List<? extends SecurityScheme> authorizations) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import spock.lang.Unroll
import springfox.documentation.schema.ModelRef
import springfox.documentation.service.AllowableListValues

class ParameterBulderSpec extends Specification {
class ParameterBuilderSpec extends Specification {
@Unroll
def "Setting properties on the builder with non-null values"() {
given:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class PetController {

@RequestMapping(value = "/{petId}", method = GET)
@ApiOperation(
value = "Find pet by ID", notes = "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API " +
value = "Find pet by ID", notes = "Returns a pet when ID < 10. ID > 10 or non-integers will simulate API " +
"error conditions",
response = Pet.class,
responseHeaders = {
Expand Down Expand Up @@ -115,7 +115,7 @@ public ResponseEntity<String> updatePet(
@RequestMapping(value = "/findByStatus", method = GET)
@ApiOperation(
value = "Finds Pets by status",
notes = "Multiple status values can be provided with comma seperated strings",
notes = "Multiple status values can be provided with comma-separated strings",
response = Pet.class,
responseContainer = "List",
authorizations = @Authorization(value = "petstore_auth", scopes = {
Expand Down Expand Up @@ -147,7 +147,7 @@ public ResponseEntity<List<Pet>> findPetsByStatus(
@RequestMapping(value = "/findByTags", method = GET)
@ApiOperation(
value = "Finds Pets by tags",
notes = "Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.",
notes = "Multiple tags can be provided with comma-separated strings. Use tag1, tag2, tag3 for testing.",
response = Pet.class,
responseContainer = "List",
authorizations = @Authorization(value = "petstore_auth", scopes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public ResponseEntity<String> placeOrder(
@RequestMapping(value = "/order/{orderId}", method = DELETE)
@ApiOperation(
value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. " +
"Anything above 1000 or nonintegers will generate API errors"
"Anything above 1000 or non-integers will generate API errors"
)
@ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid ID supplied"),
@ApiResponse(code = 404, message = "Order not found") })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.springframework.web.bind.annotation.ResponseBody;
import springfox.petstore.Responses;
import springfox.petstore.model.User;
import springfox.petstore.repository.MapBackedRepository;
import springfox.petstore.repository.UserRepository;

import java.util.List;

Expand All @@ -47,9 +47,6 @@
public class UserController {
UserRepository userRepository = new UserRepository();

static class UserRepository extends MapBackedRepository<String, User> {
}

@RequestMapping(method = POST)
@ResponseBody
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ package springfox.documentation.schema.configuration
import spock.lang.Specification

class ModelsConfigurationSpec extends Specification {
def "test to include this class in the converage report" () {
def "test to include this class in the coverage report" () {
when:
def config = new ModelsConfiguration()
then:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import com.fasterxml.jackson.databind.introspect.BeanPropertyDefinition
import spock.lang.Specification

class BeanPropertyDefinitionsSpec extends Specification {
def "Connot intantiate static type"() {
def "Cannot instantiate static type"() {
when:
new BeanPropertyDefinitions()
then:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public boolean isReturnType() {
}

/**
* @return alternate type provider thats available to this context
* @return alternate type provider that's available to this context
*/
public AlternateTypeProvider getAlternateTypeProvider() {
return alternateTypeProvider;
Expand All @@ -126,7 +126,7 @@ public String getGroupName() {
*
* @param group - group name of the docket
* @param type - type
* @param documentationType - for documenation type
* @param documentationType - for documentation type
* @param alternateTypeProvider - alternate type provider
* @param genericNamingStrategy - how generic types should be named
* @param ignorableTypes - types that can be ignored
Expand Down Expand Up @@ -156,7 +156,7 @@ public static ModelContext inputParam(
*
* @param groupName - group name of the docket
* @param type - type
* @param documentationType - for documenation type
* @param documentationType - for documentation type
* @param alternateTypeProvider - alternate type provider
* @param genericNamingStrategy - how generic types should be named
* @param ignorableTypes - types that can be ignored
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface ApiListingScannerPlugin extends Plugin<DocumentationType> {
/**
* Implement this method to manually add ApiDescriptions
*
* @param context - Documentatio ncontext that can be used infer documentation context
* @param context - Documentation context that can be used infer documentation context
* @see springfox.documentation.service.ApiDescription
* @return List of {@link ApiDescription}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public List<Parameter> getGlobalRequestParameters() {
}

/**
* @deprecated @since 2.2.0 - only here for backward compatibiltiy
* @deprecated @since 2.2.0 - only here for backward compatibility
*/
@Deprecated
public ResourceGroupingStrategy getResourceGroupingStrategy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public DocumentationContextBuilder additionalOperationParameters(List<Parameter>
}

/**
@deprecated @since 2.2.0 - only here for backward compatibiltiy
@deprecated @since 2.2.0 - only here for backward compatibility
*/
@Deprecated
public DocumentationContextBuilder withResourceGroupingStrategy(ResourceGroupingStrategy resourceGroupingStrategy) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected boolean isHandler(Class<?> beanType) {

/**
* The lookup handler method, maps the SEOMapper method to the request URL.
* <p>If no mapping is found, or if the URL is disabled, it will simply drop throug
* <p>If no mapping is found, or if the URL is disabled, it will simply drop through
* to the standard 404 handling.</p>
*
* @param urlPath the path to match.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ public Docket alternateTypeRules(AlternateTypeRule... alternateTypeRules) {
* specifying position might not work.
*
* @param operationOrdering
* @return
* @return this Docket
*/
public Docket operationOrdering(Ordering<Operation> operationOrdering) {
this.operationOrdering = operationOrdering;
Expand Down Expand Up @@ -387,10 +387,10 @@ public Docket pathMapping(String path) {
* might have multiple request mappings for each search use case.
*
* This is an incubating feature that may not continue to be supported after the swagger specification is modified
* to accomodate the usecase as described in issue #711
* to accommodate the use case as described in issue #711
*
* @param enabled
* @return
* @return this Docket
*/
@Incubating("2.1.0")
public Docket enableUrlTemplating(boolean enabled) {
Expand All @@ -415,9 +415,9 @@ public Docket additionalModels(ResolvedType first, ResolvedType... remaining) {
/**
* Method to add global tags to the docket
*
* @param first - atleast one tag is required to use this method
* @param first - at least one tag is required to use this method
* @param remaining - remaining tags
* @return
* @return this Docket
*/
public Docket tags(Tag first, Tag... remaining) {
tags.add(first);
Expand Down
Loading

0 comments on commit 25e4375

Please sign in to comment.