File tree 3 files changed +0
-26
lines changed
src/AzureOpenAIProxy.ApiApp/Endpoints 3 files changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -81,25 +81,3 @@ rules:
81
81
- field : ' content'
82
82
function : truthy
83
83
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)
116
116
} )
117
117
. Produces < AdminEventDetails > ( statusCode : StatusCodes . Status200OK , contentType : "application/json" )
118
118
. Produces ( statusCode : StatusCodes . Status401Unauthorized )
119
- . Produces ( statusCode : StatusCodes . Status404NotFound )
120
119
. Produces < string > ( statusCode : StatusCodes . Status500InternalServerError , contentType : "text/plain" )
121
120
. WithTags ( "admin" )
122
121
. WithName ( "GetAdminEvent" )
@@ -149,7 +148,6 @@ public static RouteHandlerBuilder AddUpdateAdminEvent(this WebApplication app)
149
148
} )
150
149
. Accepts < AdminEventDetails > ( contentType : "application/json" )
151
150
. Produces < AdminEventDetails > ( statusCode : StatusCodes . Status200OK , contentType : "application/json" )
152
- . Produces ( statusCode : StatusCodes . Status400BadRequest )
153
151
. Produces ( statusCode : StatusCodes . Status401Unauthorized )
154
152
. Produces ( statusCode : StatusCodes . Status404NotFound )
155
153
. 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)
57
57
. Accepts < ChatCompletionOptions > ( contentType : "application/json" )
58
58
. Produces < CreateChatCompletionResponse > ( statusCode : StatusCodes . Status200OK , contentType : "application/json" )
59
59
// TODO: Check both request/response payloads
60
- . Produces ( statusCode : StatusCodes . Status400BadRequest )
61
60
. Produces ( statusCode : StatusCodes . Status401Unauthorized )
62
- . Produces ( statusCode : StatusCodes . Status404NotFound )
63
61
. Produces < string > ( statusCode : StatusCodes . Status500InternalServerError , contentType : "text/plain" )
64
62
. WithTags ( "openai" )
65
63
. WithName ( "GetChatCompletions" )
You can’t perform that action at this time.
0 commit comments