ng-openapi 0.1.9 → 0.1.11-pr-20-type-generator-performance-dcd6bb3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.cjs +268 -240
- package/index.d.ts +9 -19
- package/index.js +276 -243
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -166,33 +166,23 @@ declare class SwaggerParser {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
|
-
* Interface for generator
|
|
169
|
+
* Interface for generator class (both constructor and instance)
|
|
170
170
|
*/
|
|
171
|
-
interface
|
|
171
|
+
interface IPluginGeneratorClass {
|
|
172
172
|
/**
|
|
173
|
-
*
|
|
173
|
+
* Constructor signature
|
|
174
174
|
*/
|
|
175
|
-
|
|
175
|
+
new (parser: SwaggerParser, project: Project, config: GeneratorConfig): IPluginGenerator;
|
|
176
176
|
}
|
|
177
177
|
/**
|
|
178
|
-
* Interface for generator
|
|
178
|
+
* Interface for generator instances
|
|
179
179
|
*/
|
|
180
|
-
interface
|
|
181
|
-
/**
|
|
182
|
-
* Create a generator instance
|
|
183
|
-
*/
|
|
184
|
-
create(swaggerPathOrUrl: string, project: Project, config: GeneratorConfig): Promise<IPluginGenerator>;
|
|
180
|
+
interface IPluginGenerator {
|
|
185
181
|
/**
|
|
186
|
-
*
|
|
182
|
+
* Generate code files
|
|
187
183
|
*/
|
|
188
|
-
|
|
184
|
+
generate(outputRoot: string): Promise<void>;
|
|
189
185
|
}
|
|
190
|
-
/**
|
|
191
|
-
* Combined type that includes both static and instance methods
|
|
192
|
-
*/
|
|
193
|
-
type IPluginGeneratorClass = IPluginGeneratorConstructor & {
|
|
194
|
-
prototype: IPluginGenerator;
|
|
195
|
-
};
|
|
196
186
|
|
|
197
187
|
interface GeneratorConfig {
|
|
198
188
|
input: string;
|
|
@@ -287,4 +277,4 @@ declare function validateInput(inputPath: string): void;
|
|
|
287
277
|
*/
|
|
288
278
|
declare function generateFromConfig(config: GeneratorConfig): Promise<void>;
|
|
289
279
|
|
|
290
|
-
export { BASE_INTERCEPTOR_HEADER_COMMENT, type EnumValueObject, type GeneratorConfig, type GetMethodGenerationContext, HTTP_RESOURCE_GENERATOR_HEADER_COMMENT, type IPluginGenerator, type IPluginGeneratorClass,
|
|
280
|
+
export { BASE_INTERCEPTOR_HEADER_COMMENT, type EnumValueObject, type GeneratorConfig, type GetMethodGenerationContext, HTTP_RESOURCE_GENERATOR_HEADER_COMMENT, type IPluginGenerator, type IPluginGeneratorClass, MAIN_INDEX_GENERATOR_HEADER_COMMENT, type MethodGenerationContext, type NgOpenapiClientConfig, PROVIDER_GENERATOR_HEADER_COMMENT, type Parameter, type PathInfo, type RequestBody, SERVICE_GENERATOR_HEADER_COMMENT, SERVICE_INDEX_GENERATOR_HEADER_COMMENT, type SwaggerDefinition, SwaggerParser, type SwaggerResponse, type SwaggerSpec, TYPE_GENERATOR_HEADER_COMMENT, type TypeSchema, camelCase, collectUsedTypes, escapeString, extractPaths, generateFromConfig, generateParseRequestTypeParams, getBasePathTokenName, getClientContextTokenName, getRequestBodyType, getResponseType, getResponseTypeFromResponse, getTypeScriptType, hasDuplicateFunctionNames, inferResponseTypeFromContentType, isDataTypeInterface, isPrimitiveType, kebabCase, nullableType, pascalCase, type placeHolder, validateInput };
|