Skip to content

Commit

Permalink
Merge branch 'main-4.0' into pathitem-in-components
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeEdgar authored Jun 6, 2024
2 parents 6602af5 + 5f13fd5 commit 611c33a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public Optional<O> write(Header model) {
return optionalJsonObject(model).map(node -> {
if (isReference(model)) {
setReference(node, model);
setIfPresent(node, PROP_DESCRIPTION, jsonIO().toJson(model.getDescription()));
} else {
setIfPresent(node, PROP_DESCRIPTION, jsonIO().toJson(model.getDescription()));
setIfPresent(node, PROP_REQUIRED, jsonIO().toJson(model.getRequired()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public Optional<O> write(Link model) {
return optionalJsonObject(model).map(node -> {
if (isReference(model)) {
setReference(node, model);
setIfPresent(node, PROP_DESCRIPTION, jsonIO().toJson(model.getDescription()));
} else {
setIfPresent(node, PROP_OPERATION_REF, jsonIO().toJson(model.getOperationRef()));
setIfPresent(node, PROP_OPERATION_ID, jsonIO().toJson(model.getOperationId()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public Optional<O> write(Example model) {
return optionalJsonObject(model).map(node -> {
if (isReference(model)) {
setReference(node, model);
setIfPresent(node, PROP_SUMMARY, jsonIO().toJson(model.getSummary()));
setIfPresent(node, PROP_DESCRIPTION, jsonIO().toJson(model.getDescription()));
} else {
setIfPresent(node, PROP_SUMMARY, jsonIO().toJson(model.getSummary()));
setIfPresent(node, PROP_DESCRIPTION, jsonIO().toJson(model.getDescription()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public Optional<O> write(Parameter model) {
return optionalJsonObject(model).map(node -> {
if (isReference(model)) {
setReference(node, model);
setIfPresent(node, PROP_DESCRIPTION, jsonIO().toJson(model.getDescription()));
} else {
setIfPresent(node, PROP_NAME, jsonIO().toJson(model.getName()));
setIfPresent(node, PROP_IN, jsonIO().toJson(model.getIn()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public Optional<O> write(RequestBody model) {
return optionalJsonObject(model).map(node -> {
if (isReference(model)) {
setReference(node, model);
setIfPresent(node, PROP_DESCRIPTION, jsonIO().toJson(model.getDescription()));
} else {
setIfPresent(node, PROP_DESCRIPTION, jsonIO().toJson(model.getDescription()));
setIfPresent(node, PROP_CONTENT, contentIO().write(model.getContent()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public Optional<O> write(APIResponse model) {
return optionalJsonObject(model).map(node -> {
if (isReference(model)) {
setReference(node, model);
setIfPresent(node, PROP_DESCRIPTION, jsonIO().toJson(model.getDescription()));
} else {
setIfPresent(node, PROP_DESCRIPTION, jsonIO().toJson(model.getDescription()));
setIfPresent(node, PROP_HEADERS, headerIO().write(model.getHeaders()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public Optional<O> write(SecurityScheme model) {
return optionalJsonObject(model).map(node -> {
if (isReference(model)) {
setReference(node, model);
setIfPresent(node, PROP_DESCRIPTION, jsonIO().toJson(model.getDescription()));
} else {
setIfPresent(node, PROP_TYPE, jsonIO().toJson(model.getType()));
setIfPresent(node, PROP_DESCRIPTION, jsonIO().toJson(model.getDescription()));
Expand Down

0 comments on commit 611c33a

Please sign in to comment.