From 8b58b070d56e9ae54b2bb64ebe9e90c4b81128bb Mon Sep 17 00:00:00 2001 From: bnasslah Date: Mon, 7 Dec 2020 20:57:43 +0100 Subject: [PATCH] code review --- .../org/springdoc/api/mixins/SortedOpenAPIMixin.java | 8 ++++---- .../org/springdoc/api/mixins/SortedSchemaMixin.java | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedOpenAPIMixin.java b/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedOpenAPIMixin.java index afb2c19bc..96e38ceb3 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedOpenAPIMixin.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedOpenAPIMixin.java @@ -33,15 +33,15 @@ * @author bnasslashen */ @JsonPropertyOrder(value = {"openapi", "info", "externalDocs", "servers", "security", "tags", "paths", "components"}, alphabetic = true) -public abstract class SortedOpenAPIMixin { +public interface SortedOpenAPIMixin { @JsonAnyGetter @JsonPropertyOrder(alphabetic = true) - public abstract Map getExtensions(); + Map getExtensions(); @JsonAnySetter - public abstract void addExtension(String name, Object value); + void addExtension(String name, Object value); @JsonSerialize(using = PathsSerializer.class) - public abstract Paths getPaths(); + Paths getPaths(); } \ No newline at end of file diff --git a/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedSchemaMixin.java b/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedSchemaMixin.java index de28d7203..b782fd3e2 100644 --- a/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedSchemaMixin.java +++ b/springdoc-openapi-common/src/main/java/org/springdoc/api/mixins/SortedSchemaMixin.java @@ -32,19 +32,19 @@ * @author bnasslashen */ @JsonPropertyOrder(value = {"type", "format"}, alphabetic = true) -public abstract class SortedSchemaMixin { +public interface SortedSchemaMixin { @JsonAnyGetter @JsonPropertyOrder(alphabetic = true) - public abstract Map getExtensions(); + Map getExtensions(); @JsonAnySetter - public abstract void addExtension(String name, Object value); + void addExtension(String name, Object value); @JsonIgnore - public abstract boolean getExampleSetFlag(); + boolean getExampleSetFlag(); @JsonInclude(JsonInclude.Include.CUSTOM) - public abstract Object getExample(); + Object getExample(); }