pyeve / eve-swagger

Swagger extension for Eve-powered RESTful APIs
http://python-eve.org
Other
154 stars 43 forks source link

Nullable is not supported in Swagger 2.0 #74

Closed LaQuay closed 5 years ago

LaQuay commented 5 years ago

Hi, I am using eve-sqlalchemy as db-manager and the output generated by eve-swagger contains nullable attributes, which is not supported by Swagger 2.0.

My model is something like:

class MyModel():
    __tablename__ = "mymodel"

    id = Column(Integer, primary_key=True, autoincrement=True)
    title = Column(String(256))

And the output generated contains:

definitions:
  MyModel:
    type: object
    properties:
      id:
        nullable: false
        type: integer
      title:
        maxLength: 256
        nullable: true
        type: string

Note: I have seen the issue https://github.com/pyeve/eve-swagger/issues/39, but its closed and I don't know if he was using also eve-sqlalchemy.

Any idea to avoid this? Thanks!

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.