-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PathParameters are not generated properly when parameter is declared in the component #510
Comments
I think the problem is that the In the example below, it is correct that both |
That's correct. Any plan to fix it? |
Yes, I will fix it. |
Thank you |
Note that this applies to parameters other than path ones as well. At least for query ones the same thing occurs: if a parameter definition is openapi: "3.0.0"
info:
version: 1.0.0
title: Swagger Petstore
description: A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification
components:
parameters:
felineFilter:
schema:
type: boolean
in: query
name: catsOnly
description: Limits retrieved pets to cats
required: true
paths:
/pets:
get:
description: Returns a listing of pets.
parameters:
- $ref: "#/components/parameters/felineFilter"
responses:
"200":
description: Query was successful produces declare namespace Components {
namespace Parameters {
export type FelineFilter = boolean;
}
export interface QueryParameters {
felineFilter?: Parameters.FelineFilter;
}
}
declare namespace Paths {
namespace Pets {
namespace Get {
namespace Parameters {
export type $0 = Components.Parameters.FelineFilter;
}
namespace Responses {
export interface $200 {
}
}
}
}
} when |
example yaml:
generated types:
VS
and
The top one's generated PathParameters are correct, but the bottom is not.
DeletePet
andFindPetById
should havePathParameters
interface instead ofParameters
The text was updated successfully, but these errors were encountered: