Skip to content

use the proto 'optional' keyword and proto3 field presence rules for field nullability #24

@devoncarew

Description

@devoncarew

Wrt field nullability - we should try using the proto optional keyword and proto3 field presence rules to inform generation. So:

  • optional = nullable
  • not optional = not nullable
  • not optional means ints, string, enums get default values
  • required (url path params, body contents) mean non-nullable for message fields
  • potentially, lists and maps are never null (but get defaults if necessary - [] and {})?

Originally posted by @devoncarew in #1034

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions