Contributions
Validating mandatory fields
Could we add some validation that verifies attributes marked as mandatory are actual attributes present in the data definition. If you make an error when typing these the editor doesn't catch it as an error, the only way to see this is to review the model and verify the mandatory fields are correct. Quite a simple change but something that has caught me out several times when I've misspelled an attribute or used the wrong case!3.1KViews1like2CommentsCodegen issues
My developers have raised a couple of issues with the code generated from Swaggerhub for the server (aspnet5 or aspnetcore). Firstly I've moved an enumerated attribute which is used in several definitions to a domain in order to separate this into it's own class which can be altered in isolation from the APIs. The models look good in the UI, attribute and enumerated values are there, but in the generated code this creates an empty class for the attribute. Additionally, when this attribute (or others) are defined in the actual API definition, codegen creates the attribute as a string value but does not add the enumerated literals. When we generate the client code (csharp) it works fine and picks up the enums. Is this working as expected? (and if so why)1.3KViews0likes0CommentsRe: Can I mix parameter types in a Swagger document
After looking at this for sometime I've actually solved this by changing the syntax to parameters: - name: paymentrequest in: body description: a request to make a transfer of money required: true schema: $ref: "#/definitions/Payment_Request_Full" - name: brand in: query description:blah, blah required: true type: string This doesn't seem in keeping with the Open API specification and the examples shown in there for multiple parameters in YAML, see below skipParam: name: skip in: query description: number of items to skip required: true type: integer format: int32 limitParam: name: limit in: query description: max records to return required: true type: integer format: int326.7KViews1like2CommentsCan I mix parameter types in a Swagger document
I've an API definition (https://app.swaggerhub.com/api/dunkc/Payment/1.0) which has a single path to post the resource defined in the message body but also allows a query parameter to be passed. This seems sensible and 'legal' according to the specification. However, I'm getting a syntax error on my parameters definition stating Swagger Error The parameters needed to send a valid API call and the error message "Expected type array but found type object" I can't see an issue with the parameters definition (below), but wanted to check it was valid. It could also be an issue with the data definition the schema is referencing but even if I remove the whole body parameter referencing the schema I have the same error parameters: paymentrequest: name: paymentrequest in: body description: a request to make a transfer of money required: true schema: $ref: "#/definitions/Payment_Request_Full" brand: name: brand in: query description:blah, blah required: true type: stringSolved6.7KViews0likes3CommentsRe: Why is the 'Save' button unavailable?
Thanks Fernando. The reason I needed to do this was that I made a change to my API and saved, the API definition itself was saved but the Azure integration failed due to my security key expiring. Once I'd updated my integration I needed to 'save' the API again without changes to push it into Azure. The feature you've pointed out works fine for me, I just wasn't aware of it fbmattos wrote: Hi- We have attempted to improve the behavior of the 'Save' button but may have added some confusion. The 'Save' button will only be enabled if there are changes to be saved. To trigger integrations, we added a trigger button under the integrations list. This feature is described here:https://app.swaggerhub.com/help/integrations/index However, I understand how triggering multiple integrations at onceis not possible and I will discuss a solution internally. Thanks, Fernando2.8KViews0likes0CommentsWhy is the 'Save' button unavailable?
The 'Save' button for my APIs has, for reasons unknown, changed to be greyed out and unavailable for use (a 'no entry' sign being shown when I hover over it). Its not clear to me why this is but it's preventing me publishing out to my integration points. This is for all 5 of my definitions.Solved2.8KViews0likes2CommentsRe: What happened to my API
I've discussed this with Tony outside of the community posts and the re-formatting happens when the API is published, in my case published to Azure API management. This behavior is going to change with the next, imminent, release. Closing the thread2.6KViews1like0CommentsWhat happened to my API
I wrote an API in pure YAML format but this seems to have been altered overnight. Quotes have been added around the attribute values, slashes have been added to multi-line descriptions and the object description field has moved to the last attribute of the object (rather than the first where I had it). The last saved time still showed as when I saved it the previous day but the API definition looks vastly different. IS there some background processing that Swagger-Hub does we should be aware of?Solved2.7KViews0likes2Comments