Skip to content

Do not set nullable by default on pointer fields in Structs #16

@fhgbaguidi

Description

@fhgbaguidi

The idea behind this issue is to have some open api tags that we can put on fields on structs to tell to openapi-parser that the field is nullable. The field will be set as nullable only if this tag is present and the field is a pointer to something.

Example:

// Pet struct
// @openapi:schema
type Pet struct {
	ID              bson.ObjectId
	PointerOfString *string       `openapi:"nullable"`
	PointerOfStruct *Foo 
}

In this example, only PointerOfString field should be nullable in the generated openapi file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions