mafintosh / mafintosh/protocol-buffers-schema
can't specify multiple schemes for openapiv2_swagger
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 122
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
**protobuff like this**
```
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
info: {
title: "Example code"
version: "1.0"
contact: {
name: "project"
url: "https://github.com/codesprut/project"
email: "email@gmail.com"
}
}
schemes: HTTP
schemes: HTTPS
consumes: "application/json"
produces: "application/json"
}
```
**Produce**:
```
Error: Duplicate option map key schemes
at onoptionMap (\node_modules\protocol-buffers-schema\parse.js:459:43)
at onoption (\node_modules\protocol-buffers-schema\parse.js:421:19)
at Function.parse (\node_modules\protocol-buffers-schema\parse.js:664:19)
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in parse.js at the onoptionMap and onoption entry points named by the error, using the provided openapiv2_swagger schema as the reproduction. Confirm the parser's expected handling of repeated schemes and verify that both HTTP and HTTPS can be specified without the duplicate-key error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100