The Open API endpoint of the search and availability apps should return back the gateway's hostname in the "servers" section. Instead, the internal server route (service.namspace) is being returned when being used with the OSS spring cloud gateway. This does not appear to be an issue with the commercial K8s version of the gateway.
This can be observed by hitting the OpenAPI end point and inspecting the servers field. Below is an example:
http://hungryman.perfect300rock.com/api/search/v3/api-docs/
{
"openapi": "3.0.1",
"info": {
"title": "OpenAPI definition",
"version": "v0"
},
"servers": [
{
"url": "http://hungryman-search.workloads/api/search/",
"description": "Generated server url"
}
],
"paths": {
"/search": {
"get": {
"tags": [
"search-resource"
],
"operationId": "getAllSearches",
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Search"
}
}
}
}
}
}
},
"put": {
"tags": [
"search-resource"
],
"operationId": "addSearch",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Search"
}
}
},
"required": true
},
"responses": {
"201": {
"description": "Created",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/Search"
}
}
}
}
}
}
},
"/search/{id}": {
"delete": {
"tags": [
"search-resource"
],
"operationId": "deleteSearch",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
}
},
"components": {
"schemas": {
"Search": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"startTime": {
"type": "integer",
"format": "int64"
},
"endTime": {
"type": "integer",
"format": "int64"
},
"diningTypes": {
"type": "string"
},
"diningNames": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"radius": {
"type": "integer",
"format": "int32"
},
"continousSearch": {
"type": "boolean"
},
"requestSubject": {
"type": "string"
}
}
}
}
}
}
The Open API endpoint of the search and availability apps should return back the gateway's hostname in the "servers" section. Instead, the internal server route (service.namspace) is being returned when being used with the OSS spring cloud gateway. This does not appear to be an issue with the commercial K8s version of the gateway.
This can be observed by hitting the OpenAPI end point and inspecting the servers field. Below is an example:
returns: