You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Laurence Reading (Jira)" <ji...@apache.org> on 2021/03/05 18:02:00 UTC

[jira] [Created] (CAMEL-16309) The Rest Openapi schema generator has a typo; "sting" instead of "string"

Laurence Reading created CAMEL-16309:
----------------------------------------

             Summary: The Rest Openapi schema generator has a typo; "sting" instead of "string"
                 Key: CAMEL-16309
                 URL: https://issues.apache.org/jira/browse/CAMEL-16309
             Project: Camel
          Issue Type: Bug
          Components: came-core
    Affects Versions: 3.8.0, 3.7.2, 3.7.1, 3.7.0, 3.7.3
            Reporter: Laurence Reading


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|https://github.com/apache/camel/blob/3382b4dd6de52024b15efdb081e3f386af1b52f2/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java#L1243]

reads:
{code:java}
prop.type = "sting";{code}
 

This should read:
{code:java}
prop.type = "string";{code}
 

This causes it to generate a schema like:
{noformat}
	"responses": {
		"200": {
			"content": {
				"text/plain": {
					"schema": {
						"format": "string",
						"type": "sting"
					}
				}
			},
			"description": "Returns status code 200 when the report is returned"
		{noformat}
Which run used to generate a client creates code that looks for a "Sting" type which does not exist

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)