Class OpenApiParser

java.lang.Object
io.smallrye.openapi.runtime.io.OpenApiParser

@Deprecated public class OpenApiParser extends Object
Deprecated.
use the SmallRyeOpenAPI builder API instead. This class may be moved, have reduced visibility, or be removed in a future release.
A class used to parse an OpenAPI document (either YAML or JSON) into a Microprofile OpenAPI model tree.
Author:
eric.wittmann@gmail.com
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.eclipse.microprofile.openapi.models.OpenAPI
    parse(InputStream stream, Format format, OpenApiConfig config)
    Deprecated.
    Parses the resource found at the given stream.
    static final org.eclipse.microprofile.openapi.models.OpenAPI
    parse(URL url)
    Deprecated.
    Parses the resource found at the given URL.
    static org.eclipse.microprofile.openapi.models.media.Schema
    parseSchema(String schemaJson)
    Deprecated.
    Parses the schema in the provided String.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • parse

      public static final org.eclipse.microprofile.openapi.models.OpenAPI parse(URL url) throws IOException
      Deprecated.
      Parses the resource found at the given URL. This method accepts resources either in JSON or YAML format. It will parse the input and, assuming it is valid, return an instance of OpenAPI.
      Parameters:
      url - URL to OpenAPI document
      Returns:
      OpenAPIImpl parsed from URL
      Throws:
      IOException - URL parameter is not found
    • parse

      public static org.eclipse.microprofile.openapi.models.OpenAPI parse(InputStream stream, Format format, OpenApiConfig config)
      Deprecated.
      Parses the resource found at the given stream. The format of the stream must be specified.
      Parameters:
      stream - InputStream containing an OpenAPI document
      format - Format of the stream
      Returns:
      OpenAPIImpl parsed from the stream
    • parseSchema

      public static org.eclipse.microprofile.openapi.models.media.Schema parseSchema(String schemaJson)
      Deprecated.
      Parses the schema in the provided String. The format of the stream must be JSON.
      Parameters:
      schemaJson - String containing a JSON formatted schema
      Returns:
      Schema parsed from the String
      Throws:
      OpenApiRuntimeException - Errors in reading the String