Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16309

The Rest Openapi schema generator has a typo; "sting" instead of "string"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.7.0, 3.7.1, 3.7.2, 3.7.3, 3.8.0
    • 3.7.4, 3.9.0
    • camel-openapi-java
    • None
    • Unknown

    Description

      The RestOpenApiReader has a typo such that it generates an incorrect schema:

      https://github.com/apache/camel/blob/3382b4dd6de52024b15efdb081e3f386af1b52f2/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java#L124

      reads:

      prop.type = "sting";

       

      This should read:

      prop.type = "string";

       

      This causes it to generate a schema like:

      	"responses": {
      		"200": {
      			"content": {
      				"text/plain": {
      					"schema": {
      						"format": "string",
      						"type": "sting"
      					}
      				}
      			},
      			"description": "Returns status code 200 when the report is returned"
      		

      Which run used to generate a client creates code that looks for a "Sting" type which does not exist

       

      Attachments

        Activity

          People

            acosentino Andrea Cosentino
            lreading Laurence Reading
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: