swagger spec with 2 tags generates 2 api files.
#5,371 opened on Apr 12, 2017
Description
Description
I've two tags defined in the swagger spec .yaml file for each api, so when i run swagger-codegen generate, there are 2 corresponding *_api.py in apis directory. And the only difference between those two file is the class name. Shouldn't it generate only one api file, may be pick just the first tag from the list of tags??
Or is there an option to control the resultant *_api.py file name through the cli or config.json ??
currently for below .yaml it generates asset_api.py AND assetsecond_api.py
Swagger-codegen version
2.0
Swagger declaration file content or url
swagger: "2.0"
info:
description: "this is the aurora api"
version: "1.0.0"
title: "aurora api"
host: "aurora"
basePath: "/api/v1"
schemes:
- "https"
consumes:
- "application/json"
produces:
- "application/json"
paths:
/asset/DeviceClaims:
post:
tags:
- asset
- assetsecond
summary: Create or update a assetDeviceClaim
parameters:
- name: body
in: body
description: assetDeviceClaim to add
required: true
schema:
$ref: '#/definitions/assetDeviceClaim'
responses:
201:
description: "Null response"
default:
description: "unexpected error"
schema:
$ref: "#/definitions/Error"
-->
Command line used for generation
swagger-codegen generate -i restapi.yaml -DapiTests=false,apiDocs=false,modelTests=false,modelDocs=false -c config.json -l python -o py-client-new
{ "packageName" : "aurora", "packageVersion" : "1.0.0" }
Steps to reproduce
as mentioned above, let me know if missed anything.
appreciate your help.