mafintosh / mafintosh/protocol-buffers-schema

can't specify multiple schemes for openapiv2_swagger

Open
#57 0 comments 1 reaction 0 assignees View on GitHub

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

  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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.