8000 dot symbol in the path cause problems · Issue #1050 · go-swagger/go-swagger · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
dot symbol in the path cause problems #1050
Closed
@onokonem

Description

@onokonem

Problem statement

dot separated (like /{fileName}.{fileExt}) parameters in the path are parsed incorrectly.

same spec is working perfectly for swagger-codegen

Swagger specification

swagger: '2.0'
info:
  description: >-
    Minimal swagger file to demonstrate a dot-in-th-path problem
  version: 0.0.1
  title: test
tags:
  - name: test
    description: test the go-swagger generator bug
paths:
  /{fileName}.{fileExt}:
    get:
      tags:
        - test
      operationId: test
      parameters:
        - name: fileName
          in: path
          required: true
          type: string
        - name: fileExt
          in: path
          required: true
          type: string
      responses:
        '204':
          description: successful operation
        '500':
          description: Operation error

Steps to reproduce

$swagger generate client
The swagger spec at "swagger.yml" is invalid against swagger specification 2.0. see errors :
- path param "{fileName}.{fileExt}" has no parameter definition
- path param "fileName" is not present in path "/{fileName}.{fileExt}"
- path param "fileExt" is not present in path "/{fileName}.{fileExt}"

Environment

swagger version: dev (installed with go get -u github.com/go-swagger/go-swagger/cmd/swagger)
go version: go1.8.1 darwin/amd64
OS: OS X El Capitan (10.11.6)

Metadata

Metadata

Assignees

Labels

bugvalidate specRelated to github.com/go-openapi/validate

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0