Hi there,
I've created a parser for our projects which takes the model classes from
Swagger as the input and it generates the class we need as the output.
However I've realised that would be easier if we can retrieve the whole
list of methods in a single file/url. For example:
INPUT:
Pet {
id (integer, optional),
category (Category, optional),
name (string),
photoUrls (Array[string]),
tags (Array[Tag], optional),
status (string, optional): pet status in the store = ['available', 'pending'
, 'sold']
}
OUTPUT:
public class Pet: Mappable {
var id: Int?
var category: Category?
var tags: Array[Tag]?
var status: String?
required public init?(_ map: Map) {
}
public func mapping(map: Map) {
id <- map["id"]
category <- map["category"]
tags <- map["tags"]
status <- map["status"]
}
}
So the idea was to use the COMPLETE model list to generate all the needed
classes at the same time, for example, you pass two models:
INPUT:
Pet {
id (integer, optional),
category (Category, optional),
name (string),
photoUrls (Array[string]),
tags (Array[Tag], optional),
status (string, optional): pet status in the store = ['available', 'pending'
, 'sold']
}
Horse {
id (integer, optional),
category (Category, optional),
name (string),
photoUrls (Array[string]),
tags (Array[Tag], optional),
status (string, optional): pet status in the store = ['available', 'pending'
, 'sold']
}
And the output would generate two files with the two model implementations.
So my question again is: Is there any way to get all the models from the
same page and format? (ideally raw so I can simply copy everything). Please
I'm searching something different than tapping on "Model" for each endpoint.
Finally, is there any API to connect to Swagger using an authentication
like OAuth, so I only need to set the client id and secret?
Many thanks!
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.