Swagger yaml (v2.0 format) file parser in Java.
This library allow you to read API REST documentation written in Swagger YAML format (spec 2.0).
Not all specification is implemented yet.
The library is an OSGI bundle which depends on snakeyaml and guava.
See the following examples to see supported format : https://github.com/livingobjects/myrddin/tree/develop/src/test/resources
The supported Json schema types are:
schema:
type | $ref | oneOf | allOf
title: XXX
description: XXXschema:
type: array
items:
<schema>schema:
type: object
properties:
<property_name>:
<schema>
required:
- <required_prop_name>schema:
type: number
format: <format_as_string> (ex: "int32", "double")
multipleOf: <integer>
minimum: <integer>
maximum: <integer>
exclusiveMinimum: <boolean>
exclusiveMaximum: <boolean>schema:
type: string
format: <format_as_string> (ex: "email")
pattern: <regexp_pattern_as_string>
minLength: <integer>
maxLength: <integer>schema:
type: booleanschema:
$ref: <the_reference_model_as_string> (Ex: '#/definitions/TypeName')schema:
anyOf:
- subtype1
- subtype2schema:
oneOf:
- subtype1
- subtype2