Created
March 11, 2020 17:48
-
-
Save mkanoor/802eb64217e04e4e7b5fc12ac4ebf8c5 to your computer and use it in GitHub Desktop.
OpenAPI Generation Issue with forward slash
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
openapi: 3.0.1 | |
info: | |
title: Test Regex generation for parameter validation | |
version: 1.0.0 | |
components: | |
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_dont_escape_backslash | |
in: header | |
schema: | |
type: string | |
pattern: '/^pattern\d{3}$/i' | |
- name: alternation_with_forward_slash | |
in: header | |
schema: | |
type: string | |
pattern: '/ax$|/bx$' | |
- name: patten_starts_ends_with_slash | |
in: header | |
schema: | |
type: string | |
pattern: '/root/' | |
description: 'Should match only /root/ but not root' | |
responses: | |
'200': | |
$ref: "#/components/responses/OK_200" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment