Contributions
Re: Custom Response Examples vs. ref examples
Looks like my spec had the example at the same indentation as the $ref, and it needed to be one level higher. Once that change was made, the mock service properly returned the new example. Perhaps this is an additional validation that should be made?1KViews0likes1CommentCustom Response Examples vs. ref examples
I have a spec that has several different calls that return the same type of object. However, we need the different calls to return the object with slightly different values (e.g. one status field). However, a ref + example field has a warning, and just an example by itself returns nothing, I'm guessing due to the fact that the response isn't otherwise defined. Is there any way to accomplish what I want here with defining different refs for each object with a particular value?1KViews0likes2Comments429 Rate Limit Errors
I'm getting 429 errors fairly often on my mock API, despite not hitting it on a regular basis. This seems to be related to an HTTP/2 stream error, as here's the verbose output: * Connection state changed (MAX_CONCURRENT_STREAMS updated)! < HTTP/2 429 < date: Thu, 26 Apr 2018 18:21:28 GMT < content-type: application/json; charset=ISO-8859-1 < server: Jetty(6.1.26) < * Connection #0 to host virtserver.swaggerhub.com left intact {"error":"Exceeded rate limit"} Are everyone's mock servers going through the same HTTP/2 endpoint? Also, FYI, the charset of the application/json is invalid there. Not only is ISO-8859-1 an invalid encoding for JSON, but the standard doesn't even define charset as an accepted parameter, so it shouldn't be included at all. All JSON is supposed to be UTF-8, or some other UTF, which means no charset is needed.1.4KViews0likes1CommentSample Double Values Rounded in Mock Response
I've created a Location type that return latitude and longitude coordinate values, which are marked as doubles. However, in the mock response, the sample values are being rounded to integers, which is obviously unrealistic. Here's the coordinate definition: Coordinate: type: object description: "The latitude and longitude associated with a location, specified in WGS 84 reference frame." required: - longitude - latitude properties: longitude: type: number format: double description: "A longitude value as a double, with positive values being east of the meridian, negative values west." maximum: 180.0 minimum: -180.0 example: -82.003185 latitude: type: number format: double description: "A latitude value as a double, with positive values being north of the equator, negaitive values south." maximum: 180.0 minimum: -180.0 example: 43.505 In the response the sample values are rounded to -82 and 43. Any way to fix this?Solved1.9KViews0likes2CommentsRe: Troubleshooting Mock API Generation Failure
Fixing those issues made the mock API work, thanks. In addition to the fixes for the mock server on that second point, I hope you're also tracking improvements to the editor's validator to catch these issues as well as forthe error presentation for the mock API integration.3.9KViews0likes3CommentsRe: Troubleshooting Mock API Generation Failure
It is private, so I've shared with swaggerhub-support.3.9KViews0likes5CommentsTroubleshooting Mock API Generation Failure
I'm currently building an OpenAPI3 spec and trying to get the mock service to work with it. Unfortunately I'm constantly getting an integration failure from the mock API. All it says is to check the validity of the spec, which the UI says is valid. Is there any way I can troubleshoot this or get better diagnostics?Solved4KViews0likes7Comments