`openapiv3`: Map explicit field presence to `null` type
Author: aidandjCreated Apr 16, 2026Updated Jun 9, 2026
LabelsOpenAPI v3
Feature
Map proto2, proto3, and editions field presense to openapi v3 null types.
https://learn.openapis.org/upgrading/v3.0-to-v3.1.html#replace-nullable-with-type-arrays
https://protobuf.dev/programming-guides/field_presence/
I think fields with explicit presence should have null in their type array.
For example
proto3 string - implicit presense - type: ["string"]
proto3 optional string - explicit presense - type: ["string", "null"]
@JackBogart had some input on this in the PR.
Source: grpc-ecosystem/grpc-gateway