<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div><span style="font-size: 12pt;">Van,</span></div><div><br></div><div>First create a JIRA in Teiid, then <span style="font-size: 12pt;">If you can submit a pull request, I can take look and merge your changes. Your comments and contribution is highly appreciated.</span></div><div><br></div><div>Ramesh..</div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div dir="ltr">Hi,<div><br></div><div>I'm starting to work with Teiid and would like to know what the procedure is for contributing.</div><div><br></div><div>I've been working with the Swagger translator and have found a few bugs and also have an enhancement I'd like to suggest.</div><div><br></div><div>Bugs</div><div><br></div><div>1) JsonSerializer.deserialize with an unnamed array<br></div><div><br></div><div>If a Rest endpoint is called that returns an unnamed array such as:</div><div><br></div><div><div>[</div><div> {</div><div> "scheduleId": 10007,</div><div> "timeStamp": 1468000572174,</div><div> "value": <a href="tel:2813018112" target="_blank" data-mce-href="tel:2813018112">2813018112</a></div><div> },</div><div> {</div><div> "scheduleId": 10007,</div><div> "timeStamp": 1468000602173,</div><div> "value": <a href="tel:2817523712" target="_blank" data-mce-href="tel:2817523712">2817523712</a></div><div> }</div><div>]</div></div><div><br></div><div>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:</div><div><br></div><div> if (arrayLevel > objectLevel && !fieldName.empty())...<br></div><div><br></div><div>2) DDL generation</div><div>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:</div><div><br></div><div><div> boolean required = parameter.getRequired();</div><div> pp.setNullType(required ? NullType.No_Nulls : NullType.Nullable); </div></div><div><br></div><div><br></div><div>Enhancement idea:<br></div><div><br></div><div>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.</div><div><br></div><div>Please let me know if you'd like me to contribute these changes.</div><div><br></div><div>Thank,</div><div><br></div><div>Van</div></div><br>_______________________________________________<br>teiid-dev mailing list<br>teiid-dev@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/teiid-dev</blockquote><div><br></div></div></body></html>