FCLT#69806 Swagger-ui van 2.x -> 4.1.3
svn path=/Website/trunk/; revision=54539
This commit is contained in:
@@ -80,7 +80,6 @@
|
||||
"format":"date-time"
|
||||
};
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
@@ -122,7 +121,7 @@
|
||||
"200": {
|
||||
"description": "A list of `{0}`".format(model.records_title),
|
||||
"schema": {
|
||||
"$ref": "#/paths/" + model.records_name + "/get/schema/{0}".format(model.records_name)
|
||||
"$ref": "#/schema/fields/" + model.record_name + "fields"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
@@ -193,7 +192,7 @@
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/paths/" + model.records_name + "/get/schema/fields/" + model.record_name + "fields"
|
||||
"$ref": "#/schema/fields/" + model.record_name + "fields"
|
||||
}
|
||||
};
|
||||
|
||||
@@ -203,11 +202,13 @@
|
||||
};
|
||||
result["schema"][model.record_name ]["properties"][model.record_name] =
|
||||
{
|
||||
"$ref": "#/paths/" + model.records_name + "/get/schema/fields/" + model.record_name + "fields"
|
||||
"$ref": "#/schema/fields/" + model.record_name + "fields"
|
||||
}
|
||||
|
||||
if (getQParamInt("single", 0) == 1)
|
||||
{
|
||||
|
||||
result["get"].tags = [ getQParamSafe("swmodule", "XXX") ];
|
||||
result["get"].summary = "Get one `{0}`".format(model.record_title);
|
||||
result["get"].description = "Returns the `{0}`.".format(model.record_title) + "<br>" + auttext,
|
||||
|
||||
@@ -229,7 +230,7 @@
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/paths/" + model.records_name + "/get/schema/" + model.record_name
|
||||
"$ref": "#/schema/fields/" + model.record_name + "fields"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -239,7 +240,7 @@
|
||||
{
|
||||
result["post"] = {
|
||||
"tags":[
|
||||
getQParamSafe("module", "XXX")
|
||||
getQParamSafe("swmodule", "XXX")
|
||||
],
|
||||
"summary":"Add a new `{0}`".format(model.record_title),
|
||||
"description": auttext,
|
||||
@@ -250,11 +251,8 @@
|
||||
"name":"body",
|
||||
"description":"`{0}` object that needs to be added".format(model.record_title),
|
||||
"required":true,
|
||||
"xxxschema":{
|
||||
"$ref":"#/definitions/Pet"
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "#/paths/" + model.records_name + "/get/schema/" + model.record_name
|
||||
"$ref": "#/schema/fields/" + model.record_name + "fields"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -262,7 +260,7 @@
|
||||
"200": {
|
||||
"description": "A `{0}`".format(model.record_title),
|
||||
"schema": {
|
||||
"$ref": "#/paths/" + model.records_name + "/get/schema/" + model.record_name
|
||||
"$ref": "#/schema/fields/" + model.record_name + "fields"
|
||||
}
|
||||
},
|
||||
"400":{
|
||||
@@ -283,7 +281,7 @@
|
||||
{
|
||||
result["put"] = {
|
||||
"tags":[
|
||||
getQParamSafe("module", "XXX")
|
||||
getQParamSafe("swmodule", "XXX")
|
||||
],
|
||||
"summary":"Update one `{0}`".format(model.record_title),
|
||||
"description": "Update an existing `{0}`".format(model.record_title) + "<br>" + auttext,
|
||||
@@ -304,11 +302,8 @@
|
||||
"name":"body",
|
||||
"description":"`{0}` object that needs to be updated".format(model.record_title),
|
||||
"required":true,
|
||||
"xxxschema":{
|
||||
"$ref":"#/definitions/Pet"
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "#/paths/" + model.records_name + "/get/schema/" + model.record_name
|
||||
"$ref": "#/schema/fields/" + model.record_name + "fields"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -316,7 +311,7 @@
|
||||
"200": {
|
||||
"description": "A `{0}`".format(model.record_title),
|
||||
"schema": {
|
||||
"$ref": "#/paths/" + model.records_name + "/get/schema/" + model.record_name
|
||||
"$ref": "#/schema/fields/" + model.record_name + "fields"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
@@ -337,7 +332,7 @@
|
||||
{
|
||||
result["delete"] = {
|
||||
"tags":[
|
||||
getQParamSafe("module", "XXX")
|
||||
getQParamSafe("swmodule", "XXX")
|
||||
],
|
||||
"summary":"Delete one `{0}`".format(model.record_title),
|
||||
"description": auttext,
|
||||
|
||||
@@ -95,7 +95,7 @@ model_apis =
|
||||
|
||||
if (!api2_mapper[dispatch].nodoc)
|
||||
{
|
||||
var trans = "&module={1}&fac_lang={2}".format(dispatch, module, getQParamSafe("fac_lang", user_lang)) + (api2_mapper[dispatch].docparam||"");
|
||||
var trans = "&swmodule={1}&fac_lang={2}".format(dispatch, module, getQParamSafe("fac_lang", user_lang)) + (api2_mapper[dispatch].docparam||"");
|
||||
result.paths["/" + dispatch] =
|
||||
{
|
||||
"$ref": HTTP.urlzelf() + "/api2/{0}.api?swagger=1".format(dispatch) + trans
|
||||
|
||||
Reference in New Issue
Block a user