openapi-sync 5.0.3 → 5.0.5

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/README.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ## Features
12
12
 
13
+ ### 🎉 v5.0.5 - Python Support, Auto-Sync & Infinite Queries
14
+
15
+ - 🐍 **Python Type Generation** - Generate Python `dataclass` definitions alongside TypeScript types.
16
+ - 🔄 **Auto-Sync Capability** - Enhanced OpenAPI sync functionality with real-time auto-sync capability.
17
+ - ⚡ **Infinite Queries & Headers** - Added support for headers configuration and infinite query hooks in API clients.
18
+
13
19
  ### 🎉 v5.0.0 - Enhanced Client Generation & Developer Experience
14
20
 
15
21
  - 🚀 **Fully-Typed API Client Generation** - Generate type-safe clients for Fetch, Axios, React Query, SWR, and RTK Query with comprehensive inline documentation
@@ -72,11 +78,11 @@ The wizard will guide you through:
72
78
 
73
79
  ```json
74
80
  {
75
- "refetchInterval": 5000,
76
- "folder": "./src/api",
77
- "api": {
78
- "petstore": "https://petstore3.swagger.io/api/v3/openapi.json"
79
- }
81
+ "refetchInterval": 5000,
82
+ "folder": "./src/api",
83
+ "api": {
84
+ "petstore": "https://petstore3.swagger.io/api/v3/openapi.json"
85
+ }
80
86
  }
81
87
  ```
82
88
 
@@ -240,11 +246,11 @@ Supports multiple configuration formats: `openapi.sync.json`, `openapi.sync.ts`,
240
246
 
241
247
  ```json
242
248
  {
243
- "refetchInterval": 5000,
244
- "folder": "./src/api",
245
- "api": {
246
- "petstore": "https://petstore3.swagger.io/api/v3/openapi.json"
247
- }
249
+ "refetchInterval": 5000,
250
+ "folder": "./src/api",
251
+ "api": {
252
+ "petstore": "https://petstore3.swagger.io/api/v3/openapi.json"
253
+ }
248
254
  }
249
255
  ```
250
256
 
@@ -254,18 +260,18 @@ Supports multiple configuration formats: `openapi.sync.json`, `openapi.sync.ts`,
254
260
  import { IConfig } from "openapi-sync/types";
255
261
 
256
262
  const config: IConfig = {
257
- refetchInterval: 10000,
258
- folder: "./src/api",
259
- api: {
260
- "main-api": "https://api.example.com/openapi.json",
261
- },
262
- folderSplit: { byTags: true },
263
- types: { name: { prefix: "I", useOperationId: true } },
264
- endpoints: {
265
- exclude: { tags: ["deprecated"] },
266
- doc: { showCurl: true },
267
- },
268
- validations: { library: "zod" },
263
+ refetchInterval: 10000,
264
+ folder: "./src/api",
265
+ api: {
266
+ "main-api": "https://api.example.com/openapi.json",
267
+ },
268
+ folderSplit: { byTags: true },
269
+ types: { name: { prefix: "I", useOperationId: true } },
270
+ endpoints: {
271
+ exclude: { tags: ["deprecated"] },
272
+ doc: { showCurl: true },
273
+ },
274
+ validations: { library: "zod" },
269
275
  };
270
276
 
271
277
  export default config;
@@ -361,9 +367,9 @@ Alternatively, add an override to your `package.json`:
361
367
 
362
368
  ```json
363
369
  {
364
- "overrides": {
365
- "esbuild": "0.17.19"
366
- }
370
+ "overrides": {
371
+ "esbuild": "0.17.19"
372
+ }
367
373
  }
368
374
  ```
369
375
 
@@ -379,6 +385,17 @@ ISC License - see [LICENSE](LICENSE) file for details.
379
385
 
380
386
  Contributions welcome! Submit pull requests to our [GitHub repository](https://github.com/akintomiwa-fisayo/openapi-sync).
381
387
 
388
+ ### Contributors
389
+
390
+ A special thanks to the following contributors for their valuable work on this project:
391
+
392
+ <a href="https://github.com/akintomiwa-fisayo">
393
+ <img src="https://github.com/akintomiwa-fisayo.png" width="50" height="50" alt="Fisayo Akintomiwa" style="border-radius: 50%;" />
394
+ </a>
395
+ <a href="https://github.com/akintomiwaopemipo">
396
+ <img src="https://github.com/akintomiwaopemipo.png" width="50" height="50" alt="Opemipo Akintomiwa" style="border-radius: 50%;" />
397
+ </a>
398
+
382
399
  ---
383
400
 
384
401
  ## Support / Donate
package/dist/index.d.mts CHANGED
@@ -338,6 +338,7 @@ type IConfigClientGeneration = {
338
338
  * @public
339
339
  */
340
340
  type IConfig = {
341
+ language?: "typescript" | "python";
341
342
  refetchInterval?: number;
342
343
  folder?: string;
343
344
  api: Record<string, string>;
@@ -496,6 +497,7 @@ declare const JSONStringify: (obj: Record<string, any>, indent?: number) => stri
496
497
  * Render TypeScript type reference as markdown code block
497
498
  *
498
499
  * Formats a TypeScript type definition for inclusion in markdown documentation.
500
+ * Converts multiline/JSDoc comments to single-line comments to prevent breaking outer JSDoc.
499
501
  *
500
502
  * @param {string} typeRef - TypeScript type definition
501
503
  * @param {number} [indent=1] - Indentation level
@@ -553,7 +555,7 @@ declare const extractCustomCode: (fileContent: string, markerText?: string) => E
553
555
  *
554
556
  * @public
555
557
  */
556
- declare const createCustomCodeMarker: (position: "top" | "bottom", markerText?: string, includeInstructions?: boolean) => string;
558
+ declare const createCustomCodeMarker: (position: "top" | "bottom", markerText?: string, includeInstructions?: boolean, commentPrefix?: "//" | "#") => string;
557
559
  /**
558
560
  * Merge generated content with preserved custom code
559
561
  *
@@ -575,6 +577,7 @@ declare const mergeCustomCode: (generatedContent: string, existingFileContent: s
575
577
  position?: "top" | "bottom" | "both";
576
578
  markerText?: string;
577
579
  includeInstructions?: boolean;
580
+ commentPrefix?: "//" | "#";
578
581
  }) => string;
579
582
 
580
583
  declare const variableName: RegExp;
package/dist/index.d.ts CHANGED
@@ -338,6 +338,7 @@ type IConfigClientGeneration = {
338
338
  * @public
339
339
  */
340
340
  type IConfig = {
341
+ language?: "typescript" | "python";
341
342
  refetchInterval?: number;
342
343
  folder?: string;
343
344
  api: Record<string, string>;
@@ -496,6 +497,7 @@ declare const JSONStringify: (obj: Record<string, any>, indent?: number) => stri
496
497
  * Render TypeScript type reference as markdown code block
497
498
  *
498
499
  * Formats a TypeScript type definition for inclusion in markdown documentation.
500
+ * Converts multiline/JSDoc comments to single-line comments to prevent breaking outer JSDoc.
499
501
  *
500
502
  * @param {string} typeRef - TypeScript type definition
501
503
  * @param {number} [indent=1] - Indentation level
@@ -553,7 +555,7 @@ declare const extractCustomCode: (fileContent: string, markerText?: string) => E
553
555
  *
554
556
  * @public
555
557
  */
556
- declare const createCustomCodeMarker: (position: "top" | "bottom", markerText?: string, includeInstructions?: boolean) => string;
558
+ declare const createCustomCodeMarker: (position: "top" | "bottom", markerText?: string, includeInstructions?: boolean, commentPrefix?: "//" | "#") => string;
557
559
  /**
558
560
  * Merge generated content with preserved custom code
559
561
  *
@@ -575,6 +577,7 @@ declare const mergeCustomCode: (generatedContent: string, existingFileContent: s
575
577
  position?: "top" | "bottom" | "both";
576
578
  markerText?: string;
577
579
  includeInstructions?: boolean;
580
+ commentPrefix?: "//" | "#";
578
581
  }) => string;
579
582
 
580
583
  declare const variableName: RegExp;