Skip to content

Conversation

@ePaul
Copy link
Contributor

@ePaul ePaul commented Aug 27, 2015


I guess there should be some test for this ... it looks like currently all the existing tests are written in Scala. As I don't know Scala at all, I won't try to spend time trying to add a test for this. Should I add a Java test instead, or can we find some other contributor for writing the test?

Here is an example yaml file which breaks before the fix, and runs after the fix (though I did not check if the generated classes are fully sensible).

swagger: '2.0'
info:
  title: Swagger Codegen bug trigger
  description: |
     This demonstrates a bug in swagger-codegen.
  version: 0.0.1
basePath: /api
definitions:
  manual_discount:
    type: object
    properties:
      percent_value:
        type: number
        minimum: 0.0
        maximum: 100.0
paths: {}

The problem was trying to iterate over a null list.
@ePaul ePaul force-pushed the bugfix/1143-add-nullcheck-for-allowedvalues branch from b278961 to 32ffab4 Compare August 28, 2015 09:45
@xhh
Copy link
Contributor

xhh commented Sep 1, 2015

👍

wing328 added a commit that referenced this pull request Sep 1, 2015
@wing328 wing328 merged commit 7225528 into swagger-api:master Sep 1, 2015
@ePaul ePaul deleted the bugfix/1143-add-nullcheck-for-allowedvalues branch September 11, 2015 12:24
@fehguy fehguy modified the milestone: v2.1.4 Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants