DoclerLabs / api-client-generator

API client generator is a console application capable of generating an API client based on OpenAPI(Swagger) specification.
MIT License
31 stars 19 forks source link

Array of nullable strings generates wrong annotation #109

Open vsouz4 opened 6 months ago

vsouz4 commented 6 months ago

the spec:

    SomeObject:
      type: object
      required:
        - someList
      properties:
        someList:
          type: array
          items:
            $ref: '#/components/schemas/SomeNullableString'
...
    SomeNullableString:
      type: string
      nullable: true

generates code like:

/**
  * @return string|null[]
  */
public function getSomeList(): array
{
    return $this->someList;
}