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

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

     [ https://issues.apache.org/jira/browse/CAMEL-16309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrea Cosentino resolved CAMEL-16309.
--------------------------------------
    Resolution: Fixed

> 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: camel-openapi-java
>    Affects Versions: 3.7.0, 3.7.1, 3.7.2, 3.7.3, 3.8.0
>            Reporter: Laurence Reading
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 3.9.0, 3.7.4
>
>
> 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)