@@ -77,7 +77,7 @@ func newRoute(e *echo.Echo) *EchoWrapper {
7777 Desc : "GET samples" ,
7878 })
7979 samples .GETTyped ("/:id/another" , sampleHandler .GetWithQuery , Desc {
80- Name : "getSamplesWithQuery " ,
80+ Name : "getSamplesWithQueryAnother " ,
8181 Query : "yearMonth=2021-01" ,
8282 Desc : "GET samples" ,
8383 }, SampleModel {})
@@ -215,7 +215,7 @@ func TestEchoWrapper_GenerateOpenApi(t *testing.T) {
215215 "/samples/{id}/another": {
216216 "get": {
217217 "description": "GET samples",
218- "operationId": "getSamplesWithQuery ",
218+ "operationId": "getSamplesWithQueryAnother ",
219219 "parameters": [
220220 {
221221 "description":"Generated by endpoints-go",
@@ -246,7 +246,7 @@ func TestEchoWrapper_GenerateOpenApi(t *testing.T) {
246246 "auth": []
247247 }
248248 ],
249- "summary": "getSamplesWithQuery "
249+ "summary": "getSamplesWithQueryAnother "
250250 }
251251 },
252252 "/samples": {
@@ -295,7 +295,7 @@ func TestEchoWrapper_GenerateOpenApi(t *testing.T) {
295295 ]
296296}` )
297297
298- assert .JSONEq (t , string (expected ), buf .String (), buf .String ())
298+ assert .JSONEqf (t , string (expected ), buf .String (), buf .String ())
299299}
300300
301301func TestEchoWrapper_Generate (t * testing.T ) {
@@ -318,6 +318,17 @@ func TestEchoWrapper_Generate(t *testing.T) {
318318 },
319319 "api": {
320320 "getSamplesWithQuery": {
321+ "authSchema": {
322+ "header": "",
323+ "type": ""
324+ },
325+ "desc": "GET samples",
326+ "method": "GET",
327+ "path": "samples/:id?yearMonth=2021-01",
328+ "request": null,
329+ "response": null
330+ },
331+ "getSamplesWithQueryAnother": {
321332 "authSchema": {
322333 "header": "",
323334 "type": ""
@@ -354,6 +365,17 @@ func TestEchoWrapper_Generate(t *testing.T) {
354365 },
355366 "api": {
356367 "getSamplesWithQuery": {
368+ "path": "samples/:id?yearMonth=2021-01",
369+ "desc": "GET samples",
370+ "method": "GET",
371+ "authSchema": {
372+ "type": "",
373+ "header": ""
374+ },
375+ "request": null,
376+ "response": null
377+ },
378+ "getSamplesWithQueryAnother": {
357379 "authSchema": {
358380 "header": "",
359381 "type": ""
@@ -467,5 +489,5 @@ func TestEchoWrapper_Generate(t *testing.T) {
467489 }
468490}` )
469491
470- assert .JSONEq (t , string (expected ), string (actual ), string (actual ))
492+ assert .JSONEqf (t , string (expected ), string (actual ), string (actual ))
471493}
0 commit comments