Class OpenApiParser


  • public class OpenApiParser
    extends Object
    • Field Detail

      • missingFromResource

        public static final HashSet<String> missingFromResource
      • logger

        protected static final org.slf4j.Logger logger
    • Constructor Detail

      • OpenApiParser

        public OpenApiParser()
    • Method Detail

      • asYaml

        public static String asYaml​(String jsonString)
                             throws com.fasterxml.jackson.core.JsonProcessingException,
                                    IOException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException
        IOException
      • create

        public static void create​(HashSet<Class<? extends jakarta.servlet.http.HttpServlet>> pservlets)
      • toJSON

        public static org.json.JSONObject toJSON​(Info info)
      • add

        public static void add​(String tag,
                               License license,
                               org.json.JSONObject json)
      • add

        public static void add​(String tag,
                               Contact contact,
                               org.json.JSONObject json)
      • getJSON

        public static org.json.JSONObject getJSON()
      • checkExamples

        public static Tuple checkExamples()
        used to check if the examples are all correct
        Returns:
      • add

        public static void add​(String tag,
                               OAuthFlows flows,
                               org.json.JSONObject json)
      • add

        public static void add​(String tag,
                               OAuthFlow flow,
                               org.json.JSONObject json)
      • add

        public static void add​(Tag tag,
                               org.json.JSONArray array)
      • toJSON

        public static org.json.JSONObject toJSON​(ArraySchema arraySchema)
      • createJSONSchemaFromSchema

        public static org.json.JSONObject createJSONSchemaFromSchema​(org.json.JSONObject schema)
      • checkExample

        public static boolean checkExample​(String value,
                                           org.json.JSONObject schema,
                                           SchemaType type)
      • checkExample

        public static boolean checkExample​(ExampleObject e,
                                           org.json.JSONObject schema,
                                           SchemaType type)
      • toJSON

        public static org.json.JSONObject toJSON​(Parameter p)
      • add

        public static void add​(Parameter p,
                               org.json.JSONArray params)
      • toJSON

        public static org.json.JSONObject toJSON​(SchemaProperty[] properties)
      • add

        public static void add​(String tag,
                               SchemaProperty[] properties,
                               org.json.JSONObject json)
      • add

        public static void add​(String tag,
                               Content[] value,
                               org.json.JSONObject json)
      • add

        public static void add​(String tag,
                               Header[] value,
                               org.json.JSONObject json)
      • toJSON

        public static org.json.JSONObject toJSON​(ExampleObject example)
      • add

        public static void add​(String tag,
                               ExampleObject[] examples,
                               org.json.JSONObject json)
      • toJSON

        public static org.json.JSONObject toJSON​(Schema schema)
      • add

        public static void add​(String tag,
                               Schema schema,
                               org.json.JSONObject json)
      • add

        public static void add​(String tag,
                               double value,
                               org.json.JSONObject json,
                               Double ignoreIfThis)
      • add

        public static void add​(String tag,
                               Class<?>[] clzlist,
                               org.json.JSONObject json)
      • add

        public static void add​(String tag,
                               Class<?> clz,
                               org.json.JSONObject json)
      • add

        public static void add​(String tag,
                               boolean value,
                               org.json.JSONObject json,
                               Boolean ignoreIfThis)
      • add

        public static void add​(String tag,
                               int value,
                               org.json.JSONObject json,
                               Integer ignoreIfThis)
      • add

        public static void add​(String tag,
                               org.json.JSONObject values,
                               org.json.JSONObject json)
      • add

        public static void add​(String tag,
                               org.json.JSONArray values,
                               org.json.JSONObject json)
      • getStringFromResource

        public static String getStringFromResource​(String name)
      • prepareString

        public static String prepareString​(String input)
      • add

        public static void add​(String tag,
                               String value,
                               org.json.JSONObject json)
      • add

        public static void add​(String tag,
                               String value,
                               org.json.JSONObject json,
                               boolean parseValue)
      • add

        public static void add​(String tag,
                               String[] values,
                               org.json.JSONObject json)