Imported Google Group message.
Sender:Martin Buhr
.
Date:Sunday, 26 April 2015 23:12:46 UTC+1.
Hi Martin,
Thanks for reply and support. Yes, I do think it is a bug. I did some tests and:
Using the Tyk Analytics, I have created these whitelisted endpoints.
GET /documents
POST /documents
PUT /documents
DELETE /documents.
And the result in API Definition on MongoDB was:
“extended_paths” : {
“ignored” : [ ],
“white_list” : [
{
“path” : “/documents”,
“method_actions” : {
“GET” : {
“action” : “no_action”,
“code” : 200,
“data” : “”,
“headers” : {
}
}
}
},
{
“path” : “/documents”,
“method_actions” : {
“POST” : {
“action” : “no_action”,
“code” : 200,
“data” : “”,
“headers” : {
}
}
}
},
{
“path” : “/documents”,
“method_actions” : {
“PUT” : {
“action” : “no_action”,
“code” : 200,
“data” : “”,
“headers” : {
}
}
}
},
{
“path” : “/documents”,
“method_actions” : {
“DELETE” : {
“action” : “no_action”,
“code” : 200,
“data” : “”,
“headers” : {
}
}
}
}
],
“black_list” : [ ],
“cache” : [ ],
“transform” : [ ],
“transform_headers” : [ ]
}
In this scenario, only GET /documents works ok, but for other methods, I have received “409 Conflict”. After that, as Martin suggested, I manually altered the API definition in MongoDB to this:
“extended_paths” : {
“ignored” : [ ],
“white_list” : [
{
“path” : “/documents”,
“method_actions” : {
“GET” : {
“action” : “no_action”,
“code” : 200,
“data” : “”,
“headers” : {
}
},
“POST” : {
“action” : “no_action”,
“code” : 200,
“data” : “”,
“headers” : {
}
},
“PUT” : {
“action” : “no_action”,
“code” : 200,
“data” : “”,
“headers” : {
}
},
“DELETE” : {
“action” : “no_action”,
“code” : 200,
“data” : “”,
“headers” : {
}
}
}
}
],
“black_list” : [ ],
“cache” : [ ],
“transform” : [ ],
“transform_headers” : [ ]
}
And then, everything has been working properly! For now I’ll manually edit my API definitions.
Martin, I’ll open an issue on github. Thank you!