Class OpenApiParser

    • Field Detail

      • missingFromResource

        public final HashSet<String> missingFromResource
      • logger

        protected final org.slf4j.Logger logger
    • Constructor Detail

      • OpenApiParser

        public OpenApiParser​(WebServer server)
    • Method Detail

      • getServlets

        public Set<Class<? extends jakarta.servlet.http.HttpServlet>> getServlets()
      • asYaml

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

        public org.json.JSONObject toJSON​(AsyncInfo info)
      • toJSON

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

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

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

        public org.json.JSONObject getJSON()
      • add

        public void add​(String tag,
                        Tag[] tags,
                        org.json.JSONObject json)
      • add

        public void add​(String tag,
                        HashSet<Tag> tags,
                        org.json.JSONObject json)
      • toJSON

        public org.json.JSONObject toJSON​(ObjectSchema p)
      • checkExamples

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

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

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

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

        protected void addException​(String n,
                                    Class<?> ex,
                                    org.json.JSONObject resp)
      • toJSON

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

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

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

        public org.json.JSONObject getExamplesObject​(ExampleObject[] examples)
      • getExamplesObject

        public org.json.JSONObject getExamplesObject​(List<ExampleObject> examples)
      • getExamplesObject

        public org.json.JSONObject getExamplesObject​(HashMap<String,​String> examples)
      • getExamplesArray

        public org.json.JSONArray getExamplesArray​(ExampleObject[] examples)
      • getExamplesArray

        public org.json.JSONArray getExamplesArray​(List<ExampleObject> examples)
      • getExamplesArray

        public org.json.JSONArray getExamplesArray​(HashMap<String,​String> examples)
      • toJSON

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public String getStringFromResource​(String name)
      • prepareString

        public String prepareString​(String input)
      • add

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

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

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

        public String getCachedJSON()
      • getCachedYAML

        public String getCachedYAML()