Skip to content

Commit

Permalink
Swagger UI 5.4.2
Browse files Browse the repository at this point in the history
Redoc 2.1.1
Allow null values for extensions properties in openapi object

Added Swagger UI property persistAuthorization

Fixed #1178
  • Loading branch information
altro3 committed Sep 2, 2023
1 parent ba84592 commit dff5823
Show file tree
Hide file tree
Showing 5 changed files with 275 additions and 258 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

/**
Expand All @@ -36,6 +37,7 @@
public abstract class OpenAPIMixin {

@JsonAnyGetter
@JsonInclude
public abstract Map<String, Object> getExtensions();

@JsonAnySetter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ final class SwaggerUIConfig extends AbstractViewConfig {
private static final String COMMNA_NEW_LINE = ",\n";

// https://github.com/swagger-api/swagger-ui/blob/HEAD/docs/usage/configuration.md
private static final Map<String, Function<String, Object>> VALID_OPTIONS = new HashMap<>(29);
private static final Map<String, Function<String, Object>> VALID_OPTIONS = new HashMap<>(30);
// https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/oauth2.md
private static final Map<String, Function<String, Object>> VALID_OAUTH2_OPTIONS = new HashMap<>(9);

Expand Down Expand Up @@ -98,6 +98,7 @@ final class SwaggerUIConfig extends AbstractViewConfig {
VALID_OPTIONS.put("supportedSubmitMethods", AbstractViewConfig::asString);
VALID_OPTIONS.put("validatorUrl", AbstractViewConfig::asQuotedString);
VALID_OPTIONS.put("withCredentials", AbstractViewConfig::asBoolean);
VALID_OPTIONS.put("persistAuthorization", AbstractViewConfig::asBoolean);

VALID_OAUTH2_OPTIONS.put(OPTION_OAUTH2 + ".clientId", AbstractViewConfig::asQuotedString);
VALID_OAUTH2_OPTIONS.put(OPTION_OAUTH2 + ".clientSecret", AbstractViewConfig::asQuotedString);
Expand Down
520 changes: 267 additions & 253 deletions openapi/src/main/resources/templates/redoc/res/redoc.standalone.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit dff5823

Please sign in to comment.