[teiid-issues] [JBoss JIRA] (TEIID-4326) Swagger translator bugs and enhancement request
Ramesh Reddy (JIRA)
issues at jboss.org
Sat Jul 9 22:36:00 EDT 2016
[ https://issues.jboss.org/browse/TEIID-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ramesh Reddy reassigned TEIID-4326:
-----------------------------------
Assignee: Ramesh Reddy (was: Steven Hawkins)
> Swagger translator bugs and enhancement request
> -----------------------------------------------
>
> Key: TEIID-4326
> URL: https://issues.jboss.org/browse/TEIID-4326
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.0, 9.0.1
> Environment: Windows 7 x64
> Java 8
> Reporter: Van Dillon
> Assignee: Ramesh Reddy
>
> This JIRA is in response to instructions from Ramesh Reddy in the teiid-dev mailing list (http://lists.jboss.org/pipermail/teiid-dev/2016-July/000997.html)
> Bugs
> 1) JsonSerializer.deserialize with an unnamed array
> If a Rest endpoint is called that returns an unnamed array such as:
> [
> {
> "scheduleId": 10007,
> "timeStamp": 1468000572174,
> "value": 2813018112
> },
> {
> "scheduleId": 10007,
> "timeStamp": 1468000602173,
> "value": 2817523712
> }
> ]
> the JsonSerializer.deserialize method throws an EmptyStackException in the
> END_ARRAY case because the 'fieldName' stack is empty. A check for empty
> in the if clause fixes the problem:
> if (arrayLevel > objectLevel && !fieldName.empty())...
> 2) DDL generation
> When the schema DDL is generated from the Swagger, all procedure parameters
> have their NullType set to NullType.No_Nulls. Can this be set depending on
> the Swagger parameter 'required' field? For instance:
> boolean required = parameter.getRequired();
> pp.setNullType(required ? NullType.No_Nulls : NullType.Nullable);
> Enhancement idea:
> REST apis that are not Swagger based could be used with the Swagger
> translator if a user could provide a swagger.json file they've created in
> the Swagger Editor. I've added some changes to SwaggerMetadataProcessor
> that allow a user to specify an importer property, swaggerFilePath, that's
> used in the getSchema method to load the Swagger metadata from file.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the teiid-issues
mailing list