File tree Expand file tree Collapse file tree 3 files changed +9
-18
lines changed Expand file tree Collapse file tree 3 files changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ public function getOpenApiValidatorBuilder(): ValidatorBuilder
4141 $ specType = $ this ->getSpecFileType ();
4242
4343 if ($ specType === 'json ' ) {
44- $ this ->openApiValidatorBuilder = (new ValidatorBuilder ())->fromJson ($ this ->getOpenApiSpec ());
44+ $ this ->openApiValidatorBuilder = (new ValidatorBuilder ())->fromJsonFile ($ this ->getOpenApiSpecPath ());
4545 } elseif ($ specType === 'yaml ' ) {
46- $ this ->openApiValidatorBuilder = (new ValidatorBuilder ())->fromYaml ($ this ->getOpenApiSpec ());
46+ $ this ->openApiValidatorBuilder = (new ValidatorBuilder ())->fromYamlFile ($ this ->getOpenApiSpecPath ());
4747 } else {
4848 throw new UnknownParserForFileTypeException ("Unknown parser for file type {$ specType }" );
4949 }
@@ -185,16 +185,6 @@ protected function shouldSkipRequestValidation(): bool
185185 return false ;
186186 }
187187
188- /**
189- * Gets the open api spec (contents).
190- *
191- * @return string
192- */
193- protected function getOpenApiSpec (): string
194- {
195- return File::get ($ this ->getOpenApiSpecPath ());
196- }
197-
198188 /**
199189 * Gets the openapi.yaml path.
200190 */
Original file line number Diff line number Diff line change @@ -73,12 +73,7 @@ paths:
7373 ' 200 ' :
7474 description : OK
7575 /private :
76- get :
77- responses :
78- ' 200 ' :
79- description : OK
80- security :
81- - Basic : []
76+ $ref : ' sub-spec.yaml'
8277components :
8378 securitySchemes :
8479 Basic :
Original file line number Diff line number Diff line change 1+ get :
2+ responses :
3+ ' 200 ' :
4+ description : OK
5+ security :
6+ - Basic : []
You can’t perform that action at this time.
0 commit comments