File tree Expand file tree Collapse file tree 3 files changed +0
-26
lines changed
src/AzureOpenAIProxy.ApiApp/Endpoints Expand file tree Collapse file tree 3 files changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -81,25 +81,3 @@ rules:
8181 - field : ' content'
8282 function : truthy
8383 message : Content is required
84-
85- # Ensure endpoints with path variables define a 404 response
86- # path에 path variable이 있다면 404 응답 코드가 있어야 함
87- path-variables-require-404 :
88- description : Path variables must include a 404 response
89- severity : error
90- given : $.paths[*][*].parameters[?(@.in == 'path')]^^
91- then :
92- - field : responses.404
93- function : truthy
94- message : Response 404 is required
95-
96- # Ensure POST, PUT, PATCH methods define a 400 response
97- # verb가 POST, PUT, PATCH일 경우 400 응답코드가 있어야 함
98- post-put-patch-require-400 :
99- description : POST, PUT, PATCH methods must include a 400 response
100- given : $.paths[*][?(@property == 'post' || @property == 'put' || @property == 'patch')]
101- severity : error
102- then :
103- - field : responses.400
104- function : truthy
105- message : Response 400 is required
Original file line number Diff line number Diff line change @@ -116,7 +116,6 @@ public static RouteHandlerBuilder AddGetAdminEvent(this WebApplication app)
116116 } )
117117 . Produces < AdminEventDetails > ( statusCode : StatusCodes . Status200OK , contentType : "application/json" )
118118 . Produces ( statusCode : StatusCodes . Status401Unauthorized )
119- . Produces ( statusCode : StatusCodes . Status404NotFound )
120119 . Produces < string > ( statusCode : StatusCodes . Status500InternalServerError , contentType : "text/plain" )
121120 . WithTags ( "admin" )
122121 . WithName ( "GetAdminEvent" )
@@ -149,7 +148,6 @@ public static RouteHandlerBuilder AddUpdateAdminEvent(this WebApplication app)
149148 } )
150149 . Accepts < AdminEventDetails > ( contentType : "application/json" )
151150 . Produces < AdminEventDetails > ( statusCode : StatusCodes . Status200OK , contentType : "application/json" )
152- . Produces ( statusCode : StatusCodes . Status400BadRequest )
153151 . Produces ( statusCode : StatusCodes . Status401Unauthorized )
154152 . Produces ( statusCode : StatusCodes . Status404NotFound )
155153 . Produces < string > ( statusCode : StatusCodes . Status500InternalServerError , contentType : "text/plain" )
Original file line number Diff line number Diff line change @@ -57,9 +57,7 @@ public static RouteHandlerBuilder AddChatCompletions(this WebApplication app)
5757 . Accepts < ChatCompletionOptions > ( contentType : "application/json" )
5858 . Produces < CreateChatCompletionResponse > ( statusCode : StatusCodes . Status200OK , contentType : "application/json" )
5959 // TODO: Check both request/response payloads
60- . Produces ( statusCode : StatusCodes . Status400BadRequest )
6160 . Produces ( statusCode : StatusCodes . Status401Unauthorized )
62- . Produces ( statusCode : StatusCodes . Status404NotFound )
6361 . Produces < string > ( statusCode : StatusCodes . Status500InternalServerError , contentType : "text/plain" )
6462 . WithTags ( "openai" )
6563 . WithName ( "GetChatCompletions" )
You can’t perform that action at this time.
0 commit comments