diff --git a/.gitignore b/.gitignore index 0eb9f8bff4..b9a4c97ec8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ target/ .classpath .project .settings/ +modules/swagger-parser/src/test/resources/relative-file-references/yaml diff --git a/modules/swagger-compat-spec-parser/src/main/java/io/swagger/transform/migrate/SwaggerMigrator.java b/modules/swagger-compat-spec-parser/src/main/java/io/swagger/transform/migrate/SwaggerMigrator.java index 3b09c00985..3087fb8e70 100644 --- a/modules/swagger-compat-spec-parser/src/main/java/io/swagger/transform/migrate/SwaggerMigrator.java +++ b/modules/swagger-compat-spec-parser/src/main/java/io/swagger/transform/migrate/SwaggerMigrator.java @@ -9,15 +9,15 @@ /** * Core interface for JSON migration - *

+ * *

This takes a {@link JsonNode} as an input and outputs the transformed * {@link JsonNode}.

- *

+ * *

Note that this interface makes no guarantee as to whether * a new {@code JsonNode} is returned, or the input argument is * returned (altered or not). If this distinction is important, please document * it in your implementation(s).

- *

+ * *

You can either implement this interface directly or use one of the * predefined migrators in {@link SwaggerMigrators}.

* diff --git a/modules/swagger-compat-spec-parser/src/main/java/io/swagger/transform/migrate/V11AllowableValuesMigrator.java b/modules/swagger-compat-spec-parser/src/main/java/io/swagger/transform/migrate/V11AllowableValuesMigrator.java index b281f1bd89..4ac47f487c 100644 --- a/modules/swagger-compat-spec-parser/src/main/java/io/swagger/transform/migrate/V11AllowableValuesMigrator.java +++ b/modules/swagger-compat-spec-parser/src/main/java/io/swagger/transform/migrate/V11AllowableValuesMigrator.java @@ -14,11 +14,11 @@ /** * Patch a 1.1 {@code allowableValues} into a 1.2 {@code enum} - *

+ * *

{@code allowableValues} is an object which has at least one {@code * valueType} member, whose value is a JSON String. If this string is {@code * "LIST"}, then it is replaced by an {@code enum}, as in:

- *

+ * *

  *     {
  *         "allowableValues": {
@@ -27,15 +27,15 @@
  *         }
  *     }
  * 
- *

+ * *

which will become:

- *

+ * *

  *     {
  *         "enum": [ "a", "b", "c" ]
  *     }
  * 
- *

+ * *

Another possible value is {@code "range[]"}, however this migrator does * not handle this case (yet?).

*/ diff --git a/modules/swagger-compat-spec-parser/src/main/java/io/swagger/transform/migrate/V11ResourceListingMigrator.java b/modules/swagger-compat-spec-parser/src/main/java/io/swagger/transform/migrate/V11ResourceListingMigrator.java index 4a1f1a2511..0d7d704815 100644 --- a/modules/swagger-compat-spec-parser/src/main/java/io/swagger/transform/migrate/V11ResourceListingMigrator.java +++ b/modules/swagger-compat-spec-parser/src/main/java/io/swagger/transform/migrate/V11ResourceListingMigrator.java @@ -32,9 +32,9 @@ public final class V11ResourceListingMigrator /** * Check the validity of a "basePath" argument at the root of a resource * listing - *

+ * *

A {@code basePath} is valid if it obeys the following conditions:

- *

+ * *