swagger-api/swagger-codegen

Tags in swagger yaml breaks nodejs generated server

オープン

#2,423 opened on 2016/03/21

 (17 件のコメント) (1 件のリアクション) (0 人の担当者)HTML (5,474 件のフォーク)batch import
Issue: BugServer: Nodejshelp wanted

Repository metrics

Stars
 (12,701 個のスター)
PR merge metrics
 (PR metrics pending)

説明

I have been having a hard time using the generated nodejs server to build a mock API based on my swagger yaml file. It turns out that my use of tags in the yaml causes the generated server to have multiples of the controllers I am expecting.

If I add a single tag as follows:

      tags:
        - HTTP Request

Then when making an API request with the generated server I get the following error

Error: Cannot resolve the configured swagger-router handler: HTTP Request_shopsShopIdTransactionsGET

Removing the tag will allow the server to identify the correct controller and respond.

コントリビューターガイド