Skip to content

Commit 78393d0

Browse files
authored
Fix typos and linguistic errors in documentation (#846)
Signed-off-by: Sebastien Dionne <survivant00@gmail.com>
1 parent 52f325e commit 78393d0

File tree

6 files changed

+56
-56
lines changed

6 files changed

+56
-56
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
- File a PR with meaningful title, description and commit messages
99
- Make sure the option "Allow edits from maintainers" in the PR is selected so that the maintainers can update your PRs with minor fixes, if needed.
1010
- Recommended git settings
11-
- `git config core.autocrlf input` to tell Git convert CRLF to LF on commit but not the other way around
11+
- `git config core.autocrlf input` to tell Git to convert CRLF to LF on commit but not the other way around
1212
- To close an issue (e.g. issue 1542) automatically after a PR is merged, use keywords "fix", "close", "resolve" in the PR description, e.g. `fix #1542`. (Ref: [closing issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# OpenAPI-diff
22

3-
Compare two OpenAPI specifications (3.x) and render the difference to HTML plaintext, Markdown files, or JSON files.
3+
Compare two OpenAPI specifications (3.x) and render the difference to HTML plain text, Markdown files, or JSON files.
44

55
[![Build](https://github.com/OpenAPITools/openapi-diff/workflows/Main%20Build/badge.svg)](https://github.com/OpenAPITools/openapi-diff/actions?query=branch%3Amaster+workflow%3A"Main+Build")
66
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=OpenAPITools_openapi-diff&metric=alert_status)](https://sonarcloud.io/dashboard?id=OpenAPITools_openapi-diff)
@@ -20,7 +20,7 @@ Compare two OpenAPI specifications (3.x) and render the difference to HTML plain
2020
# Feature
2121

2222
* Supports OpenAPI spec v3.0.
23-
* Depth comparison of parameters, responses, endpoint, http method (GET,POST,PUT,DELETE...)
23+
* In-depth comparison of parameters, responses, endpoint, http method (GET,POST,PUT,DELETE...)
2424
* Supports swagger api Authorization
2525
* Render difference of property with Expression Language
2626
* HTML, Markdown, Asciidoc & JSON render
@@ -195,9 +195,9 @@ public class Main {
195195
196196
### Path Matching while comparing two OpenAPI paths
197197
198-
Path matching controls how paths from the old and new specs are paired during comparison (PathsDiff.java). The default matcher (DefaultPathMatcher) obfuscates path parameter names, meaning `/users/{id}` matches `/users/{userId}`. Default matcher fails on ambiguous signatures if spec contains few paths semantically identical. In case this behaviour is not fitting your use case, you can implement your own matching strategy.
198+
Path matching controls how paths from the old and new specs are paired during comparison (PathsDiff.java). The default matcher (DefaultPathMatcher) obfuscates path parameter names, meaning `/users/{id}` matches `/users/{userId}`. The default matcher fails on ambiguous signatures if the spec contains a few paths semantically identical. In case this behaviour is not fitting your use case, you can implement your own matching strategy.
199199
200-
You can plug in a custom matcher via `OpenApiDiffOptions` implementing the `PathMatcher` interface.:
200+
You can plug in a custom matcher via `OpenApiDiffOptions` implementing the `PathMatcher` interface:
201201
202202
```java
203203
OpenApiDiffOptions options = OpenApiDiffOptions
@@ -249,7 +249,7 @@ jsonRender.render(diff, outputStreamWriter);
249249
250250
### Extensions
251251
252-
This project uses Java Service Provider Inteface (SPI) so additional extensions can be added.
252+
This project uses Java Service Provider Interface (SPI) so additional extensions can be added.
253253
254254
To build your own extension, you simply need to create a `src/main/resources/META-INF/services/org.openapitools.openapidiff.core.compare.ExtensionDiff` file with the full classname of your implementation.
255255
Your class must also implement the `org.openapitools.openapidiff.core.compare.ExtensionDiff` interface.

cli/src/main/java/org/openapitools/openapidiff/cli/Main.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public static void main(String... args) {
9090
.numberOfArgs(2)
9191
.valueSeparator()
9292
.argName("property=value")
93-
.desc("use given header for authorisation")
93+
.desc("use given header for authorization")
9494
.build());
9595
options.addOption(
9696
Option.builder()
@@ -99,7 +99,7 @@ public static void main(String... args) {
9999
.numberOfArgs(2)
100100
.valueSeparator()
101101
.argName("property=value")
102-
.desc("use query param for authorisation")
102+
.desc("use query param for authorization")
103103
.build());
104104
options.addOption(
105105
Option.builder()
@@ -187,7 +187,7 @@ public static void main(String... args) {
187187
&& !logLevel.equalsIgnoreCase("OFF")) {
188188
throw new ParseException(
189189
String.format(
190-
"Invalid log level. Excepted: [TRACE, DEBUG, INFO, WARN, ERROR, OFF]. Given: %s",
190+
"Invalid log level. Expected: [TRACE, DEBUG, INFO, WARN, ERROR, OFF]. Given: %s",
191191
logLevel));
192192
}
193193
}

core/src/main/java/org/openapitools/openapidiff/core/OpenApiCompare.java

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ public class OpenApiCompare {
2121
private OpenApiCompare() {}
2222

2323
/**
24-
* compare two openapi doc
24+
* Compare two OpenAPI documents.
2525
*
26-
* @param oldContent old api-doc location:Json or Http
27-
* @param newContent new api-doc location:Json or Http
26+
* @param oldContent old API document location: JSON or HTTP
27+
* @param newContent new API document location: JSON or HTTP
2828
* @return Comparison result
2929
*/
3030
public static ChangedOpenApi fromContents(String oldContent, String newContent) {
3131
return fromContents(oldContent, newContent, null);
3232
}
3333

3434
/**
35-
* compare two openapi doc
35+
* Compare two OpenAPI documents.
3636
*
37-
* @param oldContent old api-doc location:Json or Http
38-
* @param newContent new api-doc location:Json or Http
39-
* @param auths
37+
* @param oldContent old API document location: JSON or HTTP
38+
* @param newContent new API document location: JSON or HTTP
39+
* @param auths authorization values
4040
* @return Comparison result
4141
*/
4242
public static ChangedOpenApi fromContents(
@@ -45,12 +45,12 @@ public static ChangedOpenApi fromContents(
4545
}
4646

4747
/**
48-
* compare two openapi doc
48+
* Compare two OpenAPI documents.
4949
*
50-
* @param oldContent old api-doc location:Json or Http
51-
* @param newContent new api-doc location:Json or Http
52-
* @param auths
53-
* @param options
50+
* @param oldContent old API document location: JSON or HTTP
51+
* @param newContent new API document location: JSON or HTTP
52+
* @param auths authorization values
53+
* @param options comparison options
5454
* @return Comparison result
5555
*/
5656
public static ChangedOpenApi fromContents(
@@ -63,22 +63,22 @@ public static ChangedOpenApi fromContents(
6363
}
6464

6565
/**
66-
* compare two openapi doc
66+
* Compare two OpenAPI documents.
6767
*
68-
* @param oldFile old api-doc file
69-
* @param newFile new api-doc file
68+
* @param oldFile old API document file
69+
* @param newFile new API document file
7070
* @return Comparison result
7171
*/
7272
public static ChangedOpenApi fromFiles(File oldFile, File newFile) {
7373
return fromFiles(oldFile, newFile, null);
7474
}
7575

7676
/**
77-
* compare two openapi doc
77+
* Compare two OpenAPI documents.
7878
*
79-
* @param oldFile old api-doc file
80-
* @param newFile new api-doc file
81-
* @param auths
79+
* @param oldFile old API document file
80+
* @param newFile new API document file
81+
* @param auths authorization values
8282
* @return Comparison result
8383
*/
8484
public static ChangedOpenApi fromFiles(
@@ -87,12 +87,12 @@ public static ChangedOpenApi fromFiles(
8787
}
8888

8989
/**
90-
* compare two openapi doc
90+
* Compare two OpenAPI documents.
9191
*
92-
* @param oldFile old api-doc file
93-
* @param newFile new api-doc file
94-
* @param auths
95-
* @param options
92+
* @param oldFile old API document file
93+
* @param newFile new API document file
94+
* @param auths authorization values
95+
* @param options comparison options
9696
* @return Comparison result
9797
*/
9898
public static ChangedOpenApi fromFiles(
@@ -101,22 +101,22 @@ public static ChangedOpenApi fromFiles(
101101
}
102102

103103
/**
104-
* compare two openapi doc
104+
* Compare two OpenAPI documents.
105105
*
106-
* @param oldLocation old api-doc location (local or http)
107-
* @param newLocation new api-doc location (local or http)
106+
* @param oldLocation old API document location (local or HTTP)
107+
* @param newLocation new API document location (local or HTTP)
108108
* @return Comparison result
109109
*/
110110
public static ChangedOpenApi fromLocations(String oldLocation, String newLocation) {
111111
return fromLocations(oldLocation, newLocation, null);
112112
}
113113

114114
/**
115-
* compare two openapi doc
115+
* Compare two OpenAPI documents.
116116
*
117-
* @param oldLocation old api-doc location (local or http)
118-
* @param newLocation new api-doc location (local or http)
119-
* @param auths
117+
* @param oldLocation old API document location (local or HTTP)
118+
* @param newLocation new API document location (local or HTTP)
119+
* @param auths authorization values
120120
* @return Comparison result
121121
*/
122122
public static ChangedOpenApi fromLocations(
@@ -125,12 +125,12 @@ public static ChangedOpenApi fromLocations(
125125
}
126126

127127
/**
128-
* compare two openapi doc
128+
* Compare two OpenAPI documents.
129129
*
130-
* @param oldLocation old api-doc location (local or http)
131-
* @param newLocation new api-doc location (local or http)
132-
* @param auths
133-
* @param options
130+
* @param oldLocation old API document location (local or HTTP)
131+
* @param newLocation new API document location (local or HTTP)
132+
* @param auths authorization values
133+
* @param options comparison options
134134
* @return Comparison result
135135
*/
136136
public static ChangedOpenApi fromLocations(
@@ -143,22 +143,22 @@ public static ChangedOpenApi fromLocations(
143143
}
144144

145145
/**
146-
* compare two openapi doc
146+
* Compare two OpenAPI documents.
147147
*
148-
* @param oldSpec old api-doc specification
149-
* @param newSpec new api-doc specification
148+
* @param oldSpec old API document specification
149+
* @param newSpec new API document specification
150150
* @return Comparison result
151151
*/
152152
public static ChangedOpenApi fromSpecifications(OpenAPI oldSpec, OpenAPI newSpec) {
153153
return fromSpecifications(oldSpec, newSpec, OpenApiDiffOptions.builder().build());
154154
}
155155

156156
/**
157-
* compare two openapi doc
157+
* Compare two OpenAPI documents.
158158
*
159-
* @param oldSpec old api-doc specification
160-
* @param newSpec new api-doc specification
161-
* @param options
159+
* @param oldSpec old API document specification
160+
* @param newSpec new API document specification
161+
* @param options comparison options
162162
* @return Comparison result
163163
*/
164164
public static ChangedOpenApi fromSpecifications(

core/src/main/java/org/openapitools/openapidiff/core/compare/MapKeyDiff.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import java.util.Map;
77
import java.util.Map.Entry;
88

9-
/** compare two Maps by key */
9+
/** Compare two Maps by key. */
1010
public class MapKeyDiff<K, V> {
1111

1212
private Map<K, V> increased;

core/src/main/java/org/openapitools/openapidiff/core/compare/ParametersDiff.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public ParametersDiffResult(
2828
this.sameOperationsDiffSchema = sameOperationsDiffSchema;
2929
}
3030
}
31-
/** compare two parameter */
31+
/** Compare two parameters. */
3232
public class ParametersDiff {
3333

3434
private static final RefPointer<Parameter> refPointer = new RefPointer<>(RefType.PARAMETERS);
@@ -108,12 +108,12 @@ public boolean pathUnchangedParametersChanged(
108108
.findFirst();
109109
if (!newParameter.isPresent()) return false;
110110

111-
// Check if the old and new Parameters match . IF so, return TRUE
111+
// Check if the old and new Parameters match. IF so, return TRUE
112112
Parameter newParameterRealized = newParameter.get();
113113
newParameterRealized.setName(parameter.getName()); // Make names similar
114114
boolean samePathDifferentParameter = !newParameterRealized.equals(parameter);
115115
newParameterRealized.setName(
116-
newParameterName); // Important:: MUST Reset the name as this is not a copy
116+
newParameterName); // Important: MUST Reset the name as this is not a copy
117117
if (samePathDifferentParameter) {
118118
return true;
119119
}

0 commit comments

Comments
 (0)