swagger-api / swagger-api/swagger-codegen
Generate client HTML2 - parameter with hyphen
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
From @ChristianKoessl on February 27, 2017 17:16
Swagger File
swagger: '2.0'
info:
version: '1.0'
description: API
title: API
schemes:
- https
paths:
/cnbs/oauth:
post:
description: Get authroization token
operationId: authorize
produces:
- application/json
parameters:
- name: sap-client
in: query
description: SAP client
required: true
type: integer
maximum: 999
- name: apiid
in: query
description: API ID
required: true
type: string
- name: API-SysID
in: header
description: System ID
required: true
type: string
responses:
'200':
description: Successful response
schema:
$ref: '#/definitions/authResponse'
default:
description: Error
schema:
$ref: '#/definitions/authResponse'
security:
- basicAuth: []
securityDefinitions:
basicAuth:
type: basic
description: User and Password
definitions:
authResponse:
type: object
properties:
access_token:
type: string
token_type:
type: string
expires_in:
type: integer
maximum: 9999
status:
$ref: '#/definitions/status'
status:
type: object
properties:
msgty:
type: string
maxLength: 1
msgid:
type: string
maxLength: 20
msgno:
type: integer
maximum: 999
msgln:
type: string
- Version:
- Browser/OS:
Issue
I am using online version from swagger editor. When I am generating HTML2 client coding, query parameter name "sap-client" is changed to "sapClient". When I generate HTML client coding, parameter name "sap-client" is unchanged. For a SAP system, parameter must be named as "sap-client".
kind regards
Christian
Copied from original issue: swagger-api/swagger-editor#1199
Contributor guide
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 with the HTML2 client generator and compare its handling of the Swagger File's query and header parameter names with the HTML client output. Reproduce the example using "sap-client" and "API-SysID"; done means generated HTML2 client requests preserve those hyphenated names exactly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100