@@ -51,8 +51,8 @@ public function getCollectionRequestSchema(ServerRequestInterface $request): Obj
5151 ], PetCollectionFilters::class)->strict ()->default ([]),
5252 'sort ' => $ p ->object ([
5353 'name ' => $ p ->union ([
54- $ p ->literal ('asc ' ),
55- $ p ->literal ('desc ' ),
54+ $ p ->const ('asc ' ),
55+ $ p ->const ('desc ' ),
5656 ])->nullable ()->default (null ),
5757 ], PetCollectionSort::class)->strict ()->default ([]),
5858 ], PetCollectionRequest::class)->strict ();
@@ -74,13 +74,13 @@ public function getCollectionResponseSchema(ServerRequestInterface $request): Ob
7474 ], PetCollectionFilters::class)->strict (),
7575 'sort ' => $ p ->object ([
7676 'name ' => $ p ->union ([
77- $ p ->literal ('asc ' ),
78- $ p ->literal ('desc ' ),
77+ $ p ->const ('asc ' ),
78+ $ p ->const ('desc ' ),
7979 ])->nullable ()->default (null ),
8080 ], PetCollectionSort::class)->strict (),
8181 'items ' => $ p ->array ($ this ->getModelResponseSchema ($ request )),
8282 'count ' => $ p ->int (),
83- '_type ' => $ p ->literal ('petCollection ' )->default ('petCollection ' ),
83+ '_type ' => $ p ->const ('petCollection ' )->default ('petCollection ' ),
8484 ], PetCollectionResponse::class)
8585 ->strict ()
8686 ->postParse (function (PetCollectionResponse $ petCollectionResponse ) {
@@ -144,9 +144,9 @@ public function getModelResponseSchema(ServerRequestInterface $request): ObjectS
144144 'tag ' => $ p ->string ()->nullable (),
145145 'vaccinations ' => $ p ->array ($ p ->object ([
146146 'name ' => $ p ->string (),
147- '_type ' => $ p ->literal ('vaccination ' )->default ('vaccination ' ),
147+ '_type ' => $ p ->const ('vaccination ' )->default ('vaccination ' ),
148148 ], VaccinationResponse::class)->strict ()),
149- '_type ' => $ p ->literal ('pet ' )->default ('pet ' ),
149+ '_type ' => $ p ->const ('pet ' )->default ('pet ' ),
150150 ], PetResponse::class)->strict ()
151151 ->postParse (function (PetResponse $ petResponse ) {
152152 $ petResponse ->_links = [
0 commit comments