kean / Get

Web API client built using async/await
MIT License
943 stars 75 forks source link

Update GitHub response models to respect API nullability #5

Closed vox-humana closed 2 years ago

vox-humana commented 2 years ago

It fixes #4 and gives more reason for code (responses) generation from OpenAPI/Swagger definition 🙂

From GitHub OpenAPI description:

public-user:
  title: Public User
  description: Public User
  type: object
  properties:
    login:
      type: string
    id:
      type: integer
    name:
      type: string
      nullable: true
    hireable:
      type: boolean
      nullable: true
    location:
      type: string
      nullable: true
    bio:
      type: string
      nullable: true
    ... 

and

email:
  title: Email
  description: Email
  type: object
  properties:
    email:
      type: string
      format: email
      example: octocat@github.com
    primary:
      type: boolean
      example: true
    verified:
      type: boolean
      example: true
    visibility:
      type: string
      example: public
      nullable: true
kean commented 2 years ago

It fixes #4 and gives more reason for code (responses) generation from OpenAPI/Swagger definition 🙂

That's exactly what I'm currently working on 👀