mafintosh / mafintosh/protocol-buffers-schema

Expose optional keyword for proto3

Open
#68 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
122
Forks
56
PR merge metrics
No merged PRs in 30d

Description

Hi @mafintosh - `optional` in proto3 has the meaning that the absence of the field can be distinguished from its default value. At the moment this module is swallowing all occurrences of the optional keyword so that users cannot see when fields have been marked this way.

I would suggest adding an `optional` boolean beside `required` and `repeated`. `required` would still always be false for proto3.

Would you accept a PR with this change ?

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue does not name a file, entry point, or test. Start by locating the schema parser's handling of proto3 field modifiers and the existing required/repeated field metadata, then inspect related tests. Done means proto3 fields marked optional expose an optional boolean while required remains false.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend-api-design
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.