Comments (7)
Hi, I'll check it out
from mmlib.swaggerforocelot.
Hi,
I'm afraid I can't reproduce it.
@nkovacic, can you please provide an original swagger.json
file? (if it is not secret, of course)
And which version of package you use?
Thanks.
from mmlib.swaggerforocelot.
Updated issue with redacted swagger.json.
from mmlib.swaggerforocelot.
Hi,
unfortunately this library does not currently support parameters (other than {everything}
at the end). Therefore, I called this issue an improvement.
It shouldn't be difficult to implement, unfortunately, now I have no time to do it.
Therefore, I leave this issue open if someone wants to create a PR.
Contribution is open.
from mmlib.swaggerforocelot.
I'm experiencing same problem with no double variables in any paths. The swagger.json "info" shows up fine, but only empty paths{} and definitions{}. I have no idea why.
I compared startup and config files in my project to files here in the repo and made sure everything matched. The only difference I can see remaining is that I have four routes defined for ocelot and only one of them with swagger. Does it matter that other routes are defined not using swagger? Does the order make any difference?
from mmlib.swaggerforocelot.
I've gone over and over the configs and startup files in both Ocelot and the web service and I can't find anything that looks different from the examples. I did try removing everything from the Ocelot config but this one service reroute and SwaggerEndpoints entry and that made no difference. Thoughts anyone?
From the gateway, the swagger json looks like this: (modified slightly)
"swagger": "2.0",
"info": {
"version": "2",
"title": "NexTrip API",
"description": "API for creating Metro Transit real-time departure information display"
},
"paths": {},
"definitions": {},
"host": "svc.{test}.org"
}
From the test server directly from the service swagger json:
"swagger": "2.0",
"info": {
"version": "2",
"title": "NexTrip API",
"description": "API for creating Metro Transit real-time departure information display"
},
"paths": {
"/api/routes": {
"get": {
"tags": [ "NexTrip" ],
"summary": "Get a list of active Routes for the current service day",
"operationId": "GetRoutes",
"consumes": [],
"produces": [ "application/json" ],
"parameters": [],
"responses": {
"200": {
"description": "Success",
"schema": {
"uniqueItems": false,
"type": "array",
"items": { "$ref": "#/definitions/Route" }
}
},
"406": {
"description": "Not Acceptable",
"schema": { "$ref": "#/definitions/ProblemDetails" }
},
"500": { "description": "Server Error" }
}
}
},
"/api/providers": {
"get": {
"tags": [ "NexTrip" ],
"summary": "Get the full list of regional transit providers",
"operationId": "GetProviders",
"consumes": [],
"produces": [ "application/json" ],
"parameters": [],
"responses": {
"200": {
"description": "Success",
"schema": {
"uniqueItems": false,
"type": "array",
"items": { "$ref": "#/definitions/Provider" }
}
},
"406": {
"description": "Not Acceptable",
"schema": { "$ref": "#/definitions/ProblemDetails" }
},
"500": { "description": "Server Error" }
}
}
},
"/api/directions/{routeId}": {
"get": {
"tags": [ "NexTrip" ],
"summary": "Get two Directions for the given Route, NB/SB or EB/WB",
"operationId": "GetDirections",
"consumes": [],
"produces": [ "application/json" ],
"parameters": [
{
"name": "routeId",
"in": "path",
"description": "",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"uniqueItems": false,
"type": "array",
"items": { "$ref": "#/definitions/Direction" }
}
},
"406": {
"description": "Not Acceptable",
"schema": { "$ref": "#/definitions/ProblemDetails" }
},
"500": { "description": "Server Error" },
"404": {
"description": "Not Found",
"schema": { "$ref": "#/definitions/ProblemDetails" }
},
"400": {
"description": "Bad Request",
"schema": { "$ref": "#/definitions/ProblemDetails" }
}
}
}
},
"/api/stops/{routeId}/{directionId}": {
"get": {
"tags": [ "NexTrip" ],
"summary": "Get the Timepoint Stops for the requested Route/Direction",
"description": "Returns a list of PlaceCodes with descriptions",
"operationId": "GetPlaces",
"consumes": [],
"produces": [ "application/json" ],
"parameters": [
{
"name": "routeId",
"in": "path",
"description": "Id for the requested route",
"required": true,
"type": "string"
},
{
"name": "directionId",
"in": "path",
"description": "Id for the requested direction",
"required": true,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"uniqueItems": false,
"type": "array",
"items": { "$ref": "#/definitions/Place" }
}
},
"406": {
"description": "Not Acceptable",
"schema": { "$ref": "#/definitions/ProblemDetails" }
},
"500": { "description": "Server Error" },
"404": {
"description": "Not Found",
"schema": { "$ref": "#/definitions/ProblemDetails" }
},
"400": {
"description": "Bad Request",
"schema": { "$ref": "#/definitions/ProblemDetails" }
}
}
}
},
"/api/{stopId}": {
"get": {
"tags": [ "NexTrip" ],
"summary": "Get a result with stop information and real-time departures",
"operationId": "GetDeparturesById",
"consumes": [],
"produces": [ "application/json" ],
"parameters": [
{
"name": "stopId",
"in": "path",
"description": "Bus stop id",
"required": true,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "Success",
"schema": { "$ref": "#/definitions/NexTripResult" }
},
"406": {
"description": "Not Acceptable",
"schema": { "$ref": "#/definitions/ProblemDetails" }
},
"500": { "description": "Server Error" },
"404": {
"description": "Not Found",
"schema": { "$ref": "#/definitions/ProblemDetails" }
},
"400": {
"description": "Bad Request",
"schema": { "$ref": "#/definitions/ProblemDetails" }
}
}
}
},
"/api/{routeId}/{directionId}/{placeCode}": {
"get": {
"tags": [ "NexTrip" ],
"summary": "Get a result with stop information and real-time departures",
"operationId": "GetDepartures",
"consumes": [],
"produces": [ "application/json" ],
"parameters": [
{
"name": "routeId",
"in": "path",
"description": "Id for the Route",
"required": true,
"type": "string"
},
{
"name": "directionId",
"in": "path",
"description": "Id for the Direction",
"required": true,
"type": "integer",
"format": "int32"
},
{
"name": "placeCode",
"in": "path",
"description": "PlaceCode for the Timepoint stop place name",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": { "$ref": "#/definitions/NexTripResult" }
},
"406": {
"description": "Not Acceptable",
"schema": { "$ref": "#/definitions/ProblemDetails" }
},
"500": { "description": "Server Error" },
"404": {
"description": "Not Found",
"schema": { "$ref": "#/definitions/ProblemDetails" }
},
"400": {
"description": "Bad Request",
"schema": { "$ref": "#/definitions/ProblemDetails" }
}
}
}
},
"/api/vehicles/{routeId}": {
"get": {
"tags": [ "NexTrip" ],
"summary": "Get an array of Vehicles in service for a Route",
"description": "Enter 0 for all Vehicles",
"operationId": "GetVehicles",
"consumes": [],
"produces": [ "application/json" ],
"parameters": [
{
"name": "routeId",
"in": "path",
"description": "",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"uniqueItems": false,
"type": "array",
"items": { "$ref": "#/definitions/Vehicle" }
}
},
"406": {
"description": "Not Acceptable",
"schema": { "$ref": "#/definitions/ProblemDetails" }
},
"500": { "description": "Server Error" },
"404": {
"description": "Not Found",
"schema": { "$ref": "#/definitions/ProblemDetails" }
},
"400": {
"description": "Bad Request",
"schema": { "$ref": "#/definitions/ProblemDetails" }
}
}
}
}
},
"definitions": {
"Route": {
"type": "object",
"properties": {
"RouteId": {
"type": "string",
"readOnly": true
},
"ProviderId": {
"format": "int32",
"type": "integer",
"readOnly": true
},
"Description": {
"type": "string",
"readOnly": true
},
"RouteAbbr": {
"type": "string",
"readOnly": true
}
}
},
"ProblemDetails": {
"type": "object",
"properties": {
"type": { "type": "string" },
"title": { "type": "string" },
"status": {
"format": "int32",
"type": "integer"
},
"detail": { "type": "string" },
"instance": { "type": "string" }
},
"additionalProperties": { "type": "object" }
},
"Provider": {
"type": "object",
"properties": {
"ProviderId": {
"format": "int32",
"type": "integer",
"readOnly": true
},
"ProviderName": {
"type": "string",
"readOnly": true
}
}
},
"Direction": {
"type": "object",
"properties": {
"DirectionId": {
"format": "int32",
"type": "integer",
"readOnly": true
},
"DirectionName": {
"type": "string",
"readOnly": true
}
}
},
"Place": {
"type": "object",
"properties": {
"PlaceCode": {
"type": "string",
"readOnly": true
},
"Description": {
"type": "string",
"readOnly": true
}
}
},
"NexTripResult": {
"type": "object",
"properties": {
"Stop": {
"$ref": "#/definitions/Stop",
"readOnly": true
},
"Departures": {
"uniqueItems": false,
"type": "array",
"items": { "$ref": "#/definitions/Departure" },
"readOnly": true
}
}
},
"Stop": {
"type": "object",
"properties": {
"StopId": {
"format": "int32",
"type": "integer",
"readOnly": true
},
"Latitude": {
"format": "double",
"type": "number",
"readOnly": true
},
"Longitude": {
"format": "double",
"type": "number",
"readOnly": true
},
"Description": {
"type": "string",
"readOnly": true
}
}
},
"Departure": {
"type": "object",
"properties": {
"Actual": {
"type": "boolean",
"readOnly": true
},
"BlockNumber": {
"format": "int32",
"type": "integer",
"readOnly": true
},
"DepartureText": {
"type": "string",
"readOnly": true
},
"DepartureTime": {
"format": "date-time",
"type": "string",
"readOnly": true
},
"Description": {
"type": "string",
"readOnly": true
},
"Gate": {
"type": "string",
"readOnly": true
},
"RouteId": {
"type": "string",
"readOnly": true
},
"DirectionId": {
"format": "int32",
"type": "integer",
"readOnly": true
},
"DirectionText": {
"type": "string",
"readOnly": true
},
"Terminal": {
"type": "string",
"readOnly": true
},
"Latitude": {
"format": "double",
"type": "number",
"readOnly": true
},
"Longitude": {
"format": "double",
"type": "number",
"readOnly": true
}
}
},
"Vehicle": {
"type": "object",
"properties": {
"BlockNumber": {
"format": "int32",
"type": "integer",
"readOnly": true
},
"DirectionId": {
"format": "int32",
"type": "integer",
"readOnly": true
},
"LocationTime": {
"format": "date-time",
"type": "string",
"readOnly": true
},
"RouteId": {
"type": "string",
"readOnly": true
},
"Terminal": {
"type": "string",
"readOnly": true
},
"Latitude": {
"format": "double",
"type": "number",
"readOnly": true
},
"Longitude": {
"format": "double",
"type": "number",
"readOnly": true
},
"Bearing": {
"format": "int32",
"type": "integer",
"readOnly": true
},
"Odometer": {
"format": "int32",
"type": "integer",
"readOnly": true
},
"Speed": {
"format": "int32",
"type": "integer",
"readOnly": true
}
}
}
}
}
from mmlib.swaggerforocelot.
Hi @jrsanbornjr
please create new issue and attach ocelot configuration too.
Thanks.
from mmlib.swaggerforocelot.
Related Issues (20)
- Wrong Swagger url generated when using KubernetesServiceDiscoveryProvider HOT 1
- Failed to load API definition issue HOT 17
- OpenApi fails on reading file HOT 2
- Virtual Directory configuration IIS doesn't work UpstreamPathTemplate 404 not found HOT 1
- Request: Api Search across all swagger docs HOT 2
- Added ApiController to Ocelot Gateway, but gets 404 when requesting it HOT 4
- Ocelot Gateway controllers return enum values as integer instead of string. HOT 1
- A bug when using .NET8-Ocelot[20.*]
- Status code 500 using 8.1.0 with multiple routes HOT 1
- Failed to load API definition - value cannot be null HOT 1
- getting error when use service discovery HOT 7
- Cant send code_challenge when using SwaggerForOcelot
- Error with gateway hosted under https://example.com/internal-gateway instead of https://example.com
- Using the Consul service discovery, it was found that the request path in the gateway swagger document does not have the "KeyToPath" property attached HOT 1
- Can you still customize your base URL in newer versions
- The swagger is not shown
- MMLib.SwaggerForOcelot failed to generate aggregate document
- Allow InjectJavascript and InjectStylesheet on the UseSwaggerForOcelotUI method HOT 1
- Default path to downstream Swagger JSON does not respect service version
- IsItSelfGatewayFirstDefinition implementation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mmlib.swaggerforocelot.