-
-
Notifications
You must be signed in to change notification settings - Fork 272
Closed
Labels
feature 🚀New feature or requestNew feature or request
Description
Add a new flag for experimental clients.
/** @type {import('@hey-api/openapi-ts').UserConfig} */
module.exports = {
experimental: true,
input: 'path/to/openapi.json',
output: 'src/client',
}This client will work towards simplification of the API. For example, instead of
DefaultsService.callToTestOrderOfParams({
parameterStringWithNoDefault: ''
})we will generate types like
DefaultsService.callToTestOrderOfParams({
query: {
parameterStringWithNoDefault: ''
}
})so they can be passed directly
public static callToTestOrderOfParams(data: TDataCallToTestOrderOfParams): CancelablePromise<void> {
const { query } = data;
return __request(OpenAPI, {
method: 'PUT',
url: '/api/v{api-version}/defaults',
query: {
parameterOptionalStringWithDefault: 'Hello World!',
parameterOptionalStringWithEmptyDefault: '',
parameterStringNullableWithDefault: null,
parameterStringWithDefault: 'Hello World!',
parameterStringWithEmptyDefault: '',
...query
}
})
}Metadata
Metadata
Assignees
Labels
feature 🚀New feature or requestNew feature or request