openapi-sync 2.1.11 → 2.1.13
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 +30 -25
- package/bin/cli.js +1 -0
- package/db.json +1 -1
- package/dist/chunk-6GQNHE6A.mjs +1 -0
- package/dist/chunk-ALDCDVEN.mjs +10 -0
- package/dist/helpers.d.mts +14 -0
- package/dist/helpers.d.ts +14 -0
- package/dist/helpers.js +10 -0
- package/dist/helpers.mjs +1 -0
- package/dist/index.d.mts +3 -17
- package/dist/index.d.ts +3 -17
- package/dist/index.js +30 -30
- package/dist/index.mjs +35 -44
- package/dist/regex.d.mts +4 -0
- package/dist/regex.d.ts +4 -0
- package/dist/regex.js +1 -0
- package/dist/regex.mjs +1 -0
- package/package.json +18 -28
package/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
[](https://www.npmjs.com/package/openapi-sync)
|
|
2
2
|
[](https://github.com/akintomiwa-fisayo/openapi-sync/blob/main/LICENSE)
|
|
3
|
+
[](https://github.com/akintomiwa-fisayo/openapi-sync)
|
|
3
4
|
|
|
4
5
|
**OpenAPI Sync** is a powerful developer tool that automates the synchronization of your API documentation with your codebase using OpenAPI (formerly Swagger) specifications. It generates TypeScript types, endpoint definitions, and comprehensive documentation from your OpenAPI schema, ensuring your API documentation stays up-to-date with your code.
|
|
5
6
|
|
|
@@ -436,15 +437,12 @@ OpenAPI Sync generates a structured output in your specified folder:
|
|
|
436
437
|
```
|
|
437
438
|
src/api/
|
|
438
439
|
├── petstore/
|
|
439
|
-
│ ├── endpoints.ts
|
|
440
|
-
│ └── types
|
|
441
|
-
|
|
442
|
-
│
|
|
443
|
-
└──
|
|
444
|
-
|
|
445
|
-
└── types/
|
|
446
|
-
├── index.ts
|
|
447
|
-
└── shared.ts
|
|
440
|
+
│ ├── endpoints.ts # Endpoint URLs and metadata
|
|
441
|
+
│ └── types.ts # Endpoint-specific types
|
|
442
|
+
├── auth-api/
|
|
443
|
+
│ ├── endpoints.ts # Endpoint URLs and metadata
|
|
444
|
+
│ └── types.ts # Endpoint-specific types
|
|
445
|
+
└── shared.ts # Shared component types
|
|
448
446
|
```
|
|
449
447
|
|
|
450
448
|
### Folder Splitting Structure
|
|
@@ -456,26 +454,21 @@ src/api/
|
|
|
456
454
|
├── petstore/
|
|
457
455
|
│ ├── admin/ # Endpoints with "admin" tag
|
|
458
456
|
│ │ ├── endpoints.ts
|
|
459
|
-
│ │ └── types
|
|
460
|
-
│ │ ├── index.ts
|
|
461
|
-
│ │ └── shared.ts
|
|
457
|
+
│ │ └── types.ts
|
|
462
458
|
│ ├── public/ # Endpoints with "public" tag
|
|
463
459
|
│ │ ├── endpoints.ts
|
|
464
|
-
│ │ └── types
|
|
465
|
-
│ │ ├── index.ts
|
|
466
|
-
│ │ └── shared.ts
|
|
460
|
+
│ │ └── types.ts
|
|
467
461
|
│ └── user/ # Endpoints with "user" tag
|
|
468
462
|
│ ├── endpoints.ts
|
|
469
|
-
│ └── types
|
|
470
|
-
|
|
471
|
-
│
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
└── types/
|
|
463
|
+
│ └── types.ts
|
|
464
|
+
│── auth-api/
|
|
465
|
+
│ ├── v1/ # Custom folder logic
|
|
466
|
+
│ │ ├── endpoints.ts
|
|
467
|
+
│ │ └── types.ts
|
|
468
|
+
│ └── v2/
|
|
469
|
+
│ ├── endpoints.ts
|
|
470
|
+
│ └── types.ts
|
|
471
|
+
└── shared.ts # Shared component types
|
|
479
472
|
```
|
|
480
473
|
|
|
481
474
|
### Generated Endpoints
|
|
@@ -1186,9 +1179,21 @@ The tool maintains state in `db.json` to track changes:
|
|
|
1186
1179
|
|
|
1187
1180
|
### Previous Versions
|
|
1188
1181
|
|
|
1182
|
+
- v2.1.13: Fix dts type fixes and Clean up tsup build config and introduction of unit testing
|
|
1183
|
+
- v2.1.12: Add automatic sync support for function-based config, improved handling of missing OpenAPI urls
|
|
1184
|
+
- v2.1.11: Folder splitting configuration for organized code generation
|
|
1185
|
+
- v2.1.10: OperationId-based naming for types and endpoints, enhanced filtering and tag support
|
|
1189
1186
|
- v2.1.9: Enhanced JSONStringify function improvements
|
|
1190
1187
|
- v2.1.8: File extension corrections and path handling
|
|
1191
1188
|
- v2.1.7: Endpoint tags support in API documentation
|
|
1189
|
+
- v2.1.6: Improved handling of nullable fields in generated types
|
|
1190
|
+
- v2.1.5: Fixed bug with recursive schema references
|
|
1191
|
+
- v2.1.4: Enhanced error messages on invalid config
|
|
1192
|
+
- v2.1.3: Add more informative debugging logs
|
|
1193
|
+
- v2.1.2: Support enum descriptions in output
|
|
1194
|
+
- v2.1.1: Update dependencies, minor TypeScript type fixes
|
|
1195
|
+
- v2.1.0: Initial v2 major release with new sync engine
|
|
1196
|
+
- v2.0.0: Major refactor and breaking changes for v2
|
|
1192
1197
|
|
|
1193
1198
|
## License
|
|
1194
1199
|
|