Open
Description
My swagger.json is split into 2 files with a the definition kept in definition.json.
I resolve all $ref
with the following:
specDoc, _ := loads.Spec(swaggerFile)
exp, _ := specDoc.Expanded()
writeToFile(*exp.Spec(), "swaggerExpanded.json")
If there a way to merge the multiple levels of allOf
into a single list of properties ? To avoid the following:
"allOf": [
{
"description": "Product detail",
"type": "object",
"title": "Product",
"allOf": [
{
"type": "object",
"title": "HalResourceSupport",
"allOf": [
{
"type": "object",
"title": "ResourceSupport",
...
I tried analysis.Flatten
but it doesn't seem to do what I'm looking for.