Skip to content

Commit ea8f519

Browse files
fix: add explicit-object-schema flag
1 parent d180681 commit ea8f519

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ final OpenAPI openAPI = new OpenAPIV3Parser().read("a.yaml", null, parseOptions)
668668
This option allows you to customize the processing of schema properties when the type is not specified. By default it is set to `true`.
669669
- `true` : when the type is not defined for property, ‘object’ is set.
670670
- `false` : the property remains undefined when no type is specified
671+
It's only applied when `resolveFully` is set to `true`.
671672

672673
### Extensions
673674
This project has a core artifact--`swagger-parser`, which uses Java Service Provider Interface (SPI) so additional extensions can be added.

modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/ResolverFully.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,15 @@ public class ResolverFully {
3939

4040
private boolean aggregateCombinators;
4141

42-
private ParseOptions parseOptions;
42+
private ParseOptions parseOptions = new ParseOptions();
43+
44+
public ResolverFully() {
45+
this(true);
46+
}
47+
48+
public ResolverFully(boolean aggregateCombinators) {
49+
this.aggregateCombinators = aggregateCombinators;
50+
}
4351

4452
public ResolverFully(ParseOptions options) {
4553
if (options != null) {

0 commit comments

Comments
 (0)