Skip to content

Commit

Permalink
fix(openapi): produce regex patterns in openapi (#4749)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Sep 25, 2024
1 parent 51ca351 commit f81aab5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions generators/openapi/src/converters/typeConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ function convertPrimitiveType(primitiveType: PrimitiveType): OpenAPIV3.NonArrayS
if (val.validation?.format != null) {
type.format = val.validation.format;
}
if (val.validation?.pattern != null) {
type.pattern = val.validation.pattern;
}
return type;
},
uuid: () => {
Expand Down
8 changes: 8 additions & 0 deletions generators/openapi/versions.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
- version: 0.1.3
createdAt: '2024-09-25'
changelogEntry:
- type: fix
summary: |
The OpenAPI generator now supports adding patterns to any string references.
irVersion: 53

- version: 0.1.2
createdAt: '2024-09-25'
changelogEntry:
Expand Down

0 comments on commit f81aab5

Please sign in to comment.