Class OpenAPISpecReader


  • public class OpenAPISpecReader
    extends java.lang.Object
    Utility class for parsing and reading the contents of an OpenAPI spec file, using the Swagger parser.
    • Constructor Summary

      Constructors 
      Constructor Description
      OpenAPISpecReader​(java.lang.String url)
      Construct a new OpenAPI object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getContactEmail()
      Retrieve the contact email address for the OpenAPI spec.
      java.lang.String getContactName()
      Retrieve the contact name for the OpenAPI spec.
      java.lang.String getContactURL()
      Retrieve the contact URL for the OpenAPI spec.
      java.lang.String getDescription()
      Retrieve the description of the OpenAPI spec.
      java.lang.String getExternalDocsDescription()
      Retrieve the description of the external docs defined for the OpenAPI spec.
      java.lang.String getExternalDocsURL()
      Retrieve the URL of external docs defined for the OpenAPI spec.
      java.lang.String getLicenseName()
      Retrieve the license name for the OpenAPI spec.
      java.lang.String getLicenseURL()
      Retrieve the license URL for the OpenAPI spec.
      java.lang.String getOpenAPIVersion()
      Retrieve the version of OpenAPI for the spec.
      io.swagger.v3.oas.models.Paths getPaths()
      Retrieve the paths defined within the spec.
      java.lang.String getTermsOfServiceURL()
      Retrieve the terms of service URL of the OpenAPI spec.
      java.lang.String getTitle()
      Retrieve the title of the OpenAPI spec.
      java.lang.String getVersion()
      Retrieve the version of the OpenAPI spec.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OpenAPISpecReader

        public OpenAPISpecReader​(java.lang.String url)
        Construct a new OpenAPI object.
        Parameters:
        url - location of the OpenAPI spec
    • Method Detail

      • getOpenAPIVersion

        public java.lang.String getOpenAPIVersion()
        Retrieve the version of OpenAPI for the spec.
        Returns:
        OpenAPI version
      • getTitle

        public java.lang.String getTitle()
        Retrieve the title of the OpenAPI spec.
        Returns:
        the title of the spec
      • getDescription

        public java.lang.String getDescription()
        Retrieve the description of the OpenAPI spec.
        Returns:
        the description of the spec
      • getTermsOfServiceURL

        public java.lang.String getTermsOfServiceURL()
        Retrieve the terms of service URL of the OpenAPI spec.
        Returns:
        the terms of service URL
      • getContactEmail

        public java.lang.String getContactEmail()
        Retrieve the contact email address for the OpenAPI spec.
        Returns:
        the contact email address
      • getContactName

        public java.lang.String getContactName()
        Retrieve the contact name for the OpenAPI spec.
        Returns:
        the contact name
      • getContactURL

        public java.lang.String getContactURL()
        Retrieve the contact URL for the OpenAPI spec.
        Returns:
        the contact URL
      • getLicenseName

        public java.lang.String getLicenseName()
        Retrieve the license name for the OpenAPI spec.
        Returns:
        the license name
      • getLicenseURL

        public java.lang.String getLicenseURL()
        Retrieve the license URL for the OpenAPI spec.
        Returns:
        the license URL
      • getVersion

        public java.lang.String getVersion()
        Retrieve the version of the OpenAPI spec.
        Returns:
        the version number
      • getExternalDocsURL

        public java.lang.String getExternalDocsURL()
        Retrieve the URL of external docs defined for the OpenAPI spec.
        Returns:
        URL for the external docs
      • getExternalDocsDescription

        public java.lang.String getExternalDocsDescription()
        Retrieve the description of the external docs defined for the OpenAPI spec.
        Returns:
        description of the external docs
      • getPaths

        public io.swagger.v3.oas.models.Paths getPaths()
        Retrieve the paths defined within the spec.
        Returns:
        the paths defined in the spec