File tree Expand file tree Collapse file tree 3 files changed +14
-20
lines changed
src/services/psc-extensions-link
test/services/psc-extensions-link Expand file tree Collapse file tree 3 files changed +14
-20
lines changed Original file line number Diff line number Diff line change @@ -149,13 +149,11 @@ export interface ExtensionDetails {
149149}
150150
151151export interface ValidationStatusError {
152- error : string ;
153- location : string ;
154- type ?: string ;
155- locationType : string ;
152+ field : string ;
153+ message : string ;
156154}
157155export interface ValidationStatusResponse {
158- errors : ValidationStatusError [ ] ;
156+ validationStatusError : ValidationStatusError [ ] ;
159157 valid : boolean ;
160158}
161159export interface ValidationStatusErrorResource {
Original file line number Diff line number Diff line change @@ -48,34 +48,30 @@ export const PSC_EXTENSION: PscExtension = {
4848
4949const VALIDATION_STATUS_RESPONSE_RESOURCE = {
5050 valid : true ,
51- errors : [ ]
51+ validation_status_error : [ ]
5252} ;
5353
5454export const VALIDATION_STATUS_RESPONSE : ValidationStatusResponse = {
5555 valid : true ,
56- errors : [ ]
56+ validationStatusError : [ ]
5757} ;
5858
5959const VALIDATION_STATUS_RESPONSE_INVALID_RESOURCE = {
6060 valid : false ,
61- errors : [
61+ validation_status_error : [
6262 {
63- error : "PSC has exceeded maximum number of extension requests" ,
64- location : "$." ,
65- location_type : "json-path" ,
66- type : "ch:validation"
63+ message : "PSC has exceeded maximum number of extension requests" ,
64+ field : "$."
6765 }
6866 ]
6967} ;
7068
7169export const VALIDATION_STATUS_RESPONSE_INVALID : ValidationStatusResponse = {
7270 valid : false ,
73- errors : [
71+ validationStatusError : [
7472 {
75- error : "PSC has exceeded maximum number of extension requests" ,
76- location : "$." ,
77- locationType : "json-path" ,
78- type : "ch:validation"
73+ message : "PSC has exceeded maximum number of extension requests" ,
74+ field : "$."
7975 }
8076 ]
8177} ;
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ describe("PSC Extensions Service", () => {
156156
157157 expect ( response . httpStatusCode ) . to . equal ( StatusCodes . OK ) ;
158158 expect ( response . resource ! . valid ) . to . be . true ;
159- expect ( response . resource ! . errors ) . to . be . empty ;
159+ expect ( response . resource ! . validationStatusError ) . to . be . empty ;
160160 } ) ;
161161
162162 it ( "should return status 200 OK and validation response when extension is invalid" , async ( ) => {
@@ -167,8 +167,8 @@ describe("PSC Extensions Service", () => {
167167
168168 expect ( response . httpStatusCode ) . to . equal ( StatusCodes . OK ) ;
169169 expect ( response . resource ! . valid ) . to . be . false ;
170- expect ( response . resource ! . errors ) . to . have . length ( 1 ) ;
171- expect ( response . resource ! . errors [ 0 ] . error ) . to . equal ( "PSC has exceeded maximum number of extension requests" ) ;
170+ expect ( response . resource ! . validationStatusError ) . to . have . length ( 1 ) ;
171+ expect ( response . resource ! . validationStatusError [ 0 ] . message ) . to . equal ( "PSC has exceeded maximum number of extension requests" ) ;
172172 } ) ;
173173
174174 it ( "should return status 400 Bad Request when parameters are invalid" , async ( ) => {
You can’t perform that action at this time.
0 commit comments