File tree Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Expand file tree Collapse file tree 3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use cebe \openapi \Reader ;
4+
5+ class IssueTest extends \PHPUnit \Framework \TestCase
6+ {
7+ // https://github.com/cebe/php-openapi/issues/175
8+ public function test175UnableToReferenceOtherLocalJsonFile ()
9+ {
10+ $ openapi = Reader::readFromJsonFile (__DIR__ .'/data/issue/175/spec.json ' );
11+ $ this ->assertInstanceOf (\cebe \openapi \SpecObjectInterface::class, $ openapi );
12+ }
13+ }
Original file line number Diff line number Diff line change 1+ {
2+ "description" : " 401 response" ,
3+ "content" : {
4+ "application/json" : {
5+ "schema" : {
6+ "properties" : {
7+ "message" : {
8+ "type" : " string"
9+ }
10+ },
11+ "required" : [
12+ " message"
13+ ]
14+ },
15+ "example" : {
16+ "message" : " Unauthenticated."
17+ }
18+ }
19+ }
20+ }
Original file line number Diff line number Diff line change 1+ {
2+ "openapi" : " 3.0.0" ,
3+ "info" : {
4+ "title" : " My API" ,
5+ "version" : " 1, 2"
6+ },
7+ "paths" : {
8+ "/v1/users/profile" : {
9+ "get" : {
10+ "operationId" : " V1GetUserProfile" ,
11+ "summary" : " Returns the user profile" ,
12+ "responses" : {
13+ "401" : {
14+ "$ref" : " ./401.json"
15+ }
16+ }
17+ }
18+ }
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments