You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use swagger-codegen and have a property query, but in the Typescript export it is renamed to _query. With previous versions it worked.
Swagger-codegen version
3.0.55, seems to be a regression
Swagger declaration file content or url
openapi: 3.0.0info:
title: Test Schema Bugreportversion: 1.19.1paths:
/api/test:
post:
summary: Send a eventrequestBody:
required: truecontent:
application/json:
schema:
type: 'array'items:
oneOf:
- $ref: '#/components/schemas/BasicEvent'responses:
'200':
description: The request was successfulcomponents:
schemas:
BasicEvent:
type: objectrequired:
description: | A basic description of an event.properties:
query:
title: Querytype: stringformat: ^([^=&]+=[^=&]*)(&([^=&]+=[^=&]*)?)*$description: A query-formatted and url encoded string to provide attributes. Multiple values for one parameter should be separated with a encoded comma (e.g. "a%2Cb" for the values a and b).example: '?foo=bar&xyz=12%263&csv=a%2Cb'
Command line used for generation
swagger-codegen generate -i schema.yaml -l typescript-axios -o out
Steps to reproduce
Run swagger-codegen
inspect result, _query? should be query?:
/* tslint:disable *//* eslint-disable *//** * Test Schema Bugreport * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: 1.19.1 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. *//** * A basic description of an event. * * @export * @interface BasicEvent */exportinterfaceBasicEvent{/** * A query-formatted and url encoded string to provide attributes. Multiple values for one parameter should be separated with a encoded comma (e.g. \"a%2Cb\" for the values a and b). * * @type {string} * @memberof BasicEvent * @example ?foo=bar&xyz=12%263&csv=a%2Cb */_query?: string;}
Related issues/PRs
Suggest a fix/enhancement
The text was updated successfully, but these errors were encountered:
robertkowalski
changed the title
[TS] query property renamed to _query
[typescript-axios] query property renamed to _query
Apr 30, 2024
Description
We use swagger-codegen and have a property
query
, but in the Typescript export it is renamed to_query
. With previous versions it worked.Swagger-codegen version
3.0.55, seems to be a regression
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
_query?
should bequery?
:Related issues/PRs
Suggest a fix/enhancement
The text was updated successfully, but these errors were encountered: