forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests and fix for issue OpenAPITools#1392. Fix regex generated …
…in Ruby client. (OpenAPITools#1393) * Added tests and fix for issue OpenAPITools#1392. Param validation with regex not recognizing \d correctly in Ruby client. * Added generated files to pass ./bin/utils/ensure-up-to-date which is run by circleci
- Loading branch information
Showing
13 changed files
with
340 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
modules/openapi-generator/src/test/resources/3_0/test_regex.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: Test Regex generation for parameter validation | ||
version: 1.0.0 | ||
components: | ||
headers: | ||
|
||
responses: | ||
OK_200: | ||
description: OK | ||
|
||
paths: | ||
/ping: | ||
get: | ||
summary: Get Payment Information | ||
description: Returns the content of a payment object | ||
parameters: | ||
- name: pattern_no_forward_slashes | ||
in: header | ||
schema: | ||
type: string | ||
pattern: '^pattern$' | ||
- name: pattern_two_slashes | ||
in: header | ||
schema: | ||
type: string | ||
pattern: '/^pattern$/i' | ||
- name: pattern_one_slash_start | ||
in: header | ||
schema: | ||
type: string | ||
pattern: '/^pattern$' | ||
- name: pattern_one_slash_end | ||
in: header | ||
schema: | ||
type: string | ||
pattern: '^pattern$/' | ||
- name: pattern_one_slash_near_end | ||
in: header | ||
schema: | ||
type: string | ||
pattern: '^pattern$/im' | ||
- name: pattern_dont_escape_backslash | ||
in: header | ||
schema: | ||
type: string | ||
pattern: '/^pattern\d{3}$/i' | ||
|
||
responses: | ||
'200': | ||
$ref: "#/components/responses/OK_200" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.