for int64 type is string but format field is not generated

Open Beginner friendly
#483 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go
Domain
api, tooling

Research direction

Start with cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi.yaml around line 446 and inspect the generated schema for int64_value_type. Trace the int64 handling in the protoc-gen-openapi generation path, then regenerate or run the relevant example tests; done means the schema includes type: string and format: int64 for int64 values.

Written by the indexing model from the issue text.

Description

"int64" is intentionally converted as string in spec generation but format field is not generated at all. For other types like enum, when it is converted as string, format field is generated to indicate its true type. Same should be done for int64.

Example:
cmd/protoc-gen-openapi/examples/tests/protobuftypes/openapi.yaml:446
int64_value_type:
type: string

It should be:
int64_value_type:
type: string
format: int64

Dominant language
Go
Stars
2.3k
Forks
279
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google/gnostic

All issues in google/gnostic

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.