Skip to content

[need] Add nullable property to openapi.yml #668

Description

@liverocaisson

Scribe version

4.19.1

Your question

First, thank you for maintaining scribe.

The generated openapi.yml is not usable in swagger or spotlight if there's a property with null value.
Those properties are reported as errors.

スクリーンショット 2023-05-15 9 59 55

OpenAPI v3 allow to use null value by adding the property "nullable".

https://stackoverflow.com/questions/48111459/how-to-define-a-property-that-can-be-string-or-null-in-openapi-swagger

As suggested bellow:

type: string
nullable: true

If we use nullable property, the error is resolved.

It would be very useful if we can set properties as nullable in the specification of parameters with Scribe.
https://scribe.knuckles.wtf/laravel/documenting/query-body-parameters

Thank you.

Docs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedContributions from the community are encouragedquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions