-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[openapi2kong] Fix server port parsing (#105)
- Loading branch information
1 parent
361b24e
commit b73332c
Showing
3 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
openapi2kong/oas3_testfiles/04a-servers-upstream.expected.json
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,38 @@ | ||
{ | ||
"_format_version": "3.0", | ||
"services": [ | ||
{ | ||
"host": "server2.com", | ||
"id": "0907c4ab-d9e4-5d21-813b-c57a97eeaad9", | ||
"name": "simple-api-overview", | ||
"path": "/", | ||
"plugins": [], | ||
"port": 65000, | ||
"protocol": "https", | ||
"routes": [ | ||
{ | ||
"id": "eee036de-517e-59cf-a2e0-17b3adfa31b5", | ||
"methods": [ | ||
"GET" | ||
], | ||
"name": "simple-api-overview_opsid", | ||
"paths": [ | ||
"~/$" | ||
], | ||
"plugins": [], | ||
"regex_priority": 200, | ||
"strip_path": false, | ||
"tags": [ | ||
"OAS3_import", | ||
"OAS3file_04a-servers-upstream.yaml" | ||
] | ||
} | ||
], | ||
"tags": [ | ||
"OAS3_import", | ||
"OAS3file_04a-servers-upstream.yaml" | ||
] | ||
} | ||
], | ||
"upstreams": [] | ||
} |
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,17 @@ | ||
# properly parses ports, see issue #104 | ||
# https://github.com/Kong/go-apiops/issues/104 | ||
openapi: '3.0.0' | ||
info: | ||
title: Simple API overview | ||
version: v2 | ||
servers: | ||
- url: https://server2.com:65000/ | ||
paths: | ||
/: | ||
get: | ||
operationId: OpsId | ||
summary: List API versions | ||
responses: | ||
'200': | ||
description: |- | ||
200 response |
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