Skip to content

Commit 3a582ff

Browse files
feat(openapi-generator): Improved OpenAPI schema generation for numeric and special types
This update enhances the OpenAPI specification generation with several improvements: 1. Numeric type handling: - Changed `number` to `integer` type for integer schemas - Added proper numeric constraints (minimum/maximum/multipleOf) for: - Regular numbers - BigInt values (now properly formatted as int64) - String-encoded numbers 2. Special type handling: - Added proper format for UUID strings - Improved date/time formatting - Added JSON string format support - Better handling of numeric unions 3. Parameter processing: - Removed redundant `explode` and `style` parameters - Added parent/paramName context for better schema inference - Improved handling of numeric constraints in unions
1 parent bcda594 commit 3a582ff

File tree

8 files changed

+650
-64
lines changed

8 files changed

+650
-64
lines changed

packages/openapi-generator/src/knownImports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ export const KNOWN_IMPORTS: KnownImports = {
297297
E.right({
298298
type: 'string',
299299
format: 'number',
300-
maximum: 0,
300+
minimum: 0,
301301
decodedType: 'bigint',
302302
}),
303303
NonPositiveBigInt: () =>

0 commit comments

Comments
 (0)