@@ -16,8 +16,14 @@ describe("Stoplight-specific defaults", () => {
1616 "http://jakub.stoplight-local.com:8080/api/v1/projects/jakub/my-project/nodes/reference/Book.v1.json" : {
1717 title : "Book"
1818 } ,
19+ "http://jakub.stoplight-local.com:8080/api/v1/projects/jakub/my-project/nodes/reference/Book.v1.json?deref=bundle&mid=1" : {
20+ title : "Book mid 1"
21+ } ,
1922 "http://marc.stoplight-local.com:8080/api/v1/projects/marc/my-project/nodes/models/Street.v1.json" : {
20- title : "Book"
23+ title : "Street"
24+ } ,
25+ "http://marc.stoplight-local.com:8080/api/v1/projects/marc/my-project/nodes/models/Street.v1.json?mid=1" : {
26+ title : "Street mid 1"
2127 } ,
2228 } ) ;
2329
@@ -29,14 +35,19 @@ describe("Stoplight-specific defaults", () => {
2935 book : {
3036 $ref : "http://jakub.stoplight-local.com:8080/api/v1/projects/jakub/my-project/nodes/reference/Book.v1.json"
3137 } ,
38+ "masked-book" : {
39+ $ref : "http://jakub.stoplight-local.com:8080/api/v1/projects/jakub/my-project/nodes/reference/Book.v1.json?deref=bundle&mid=1"
40+ } ,
3241 street : {
3342 $ref : "http://marc.stoplight-local.com:8080/api/v1/projects/marc/my-project/nodes/models/Street.v1.json"
3443 } ,
44+ "masked-street" : {
45+ $ref : "http://marc.stoplight-local.com:8080/api/v1/projects/marc/my-project/nodes/models/Street.v1.json?mid=1"
46+ } ,
3547 }
3648 } ;
3749 } ) ;
3850
39-
4051 it ( "given explicit endpointUrl, should recognize platform references pointing at that entity" , async ( ) => {
4152 let defaults = createStoplightDefaults ( {
4253 cwd,
@@ -54,17 +65,26 @@ describe("Stoplight-specific defaults", () => {
5465 definitions : {
5566 "Book.v1" : {
5667 title : "Book"
68+ } ,
69+ "Book.v1_m1" : {
70+ title : "Book mid 1"
5771 }
5872 } ,
5973 properties : {
6074 book : {
6175 $ref : "#/definitions/Book.v1"
6276 } ,
77+ "masked-book" : {
78+ $ref : "#/definitions/Book.v1_m1"
79+ } ,
6380 id : {
6481 type : "string"
6582 } ,
6683 street : {
67- title : "Book"
84+ title : "Street"
85+ } ,
86+ "masked-street" : {
87+ title : "Street mid 1"
6888 }
6989 }
7090 } ) ;
@@ -87,19 +107,31 @@ describe("Stoplight-specific defaults", () => {
87107 "Book.v1" : {
88108 title : "Book"
89109 } ,
110+ "Book.v1_m1" : {
111+ title : "Book mid 1"
112+ } ,
90113 "Street.v1" : {
91- title : "Book"
114+ title : "Street"
115+ } ,
116+ "Street.v1_m1" : {
117+ title : "Street mid 1"
92118 }
93119 } ,
94120 properties : {
95121 book : {
96122 $ref : "#/definitions/Book.v1"
97123 } ,
124+ "masked-book" : {
125+ $ref : "#/definitions/Book.v1_m1"
126+ } ,
98127 id : {
99128 type : "string"
100129 } ,
101130 street : {
102131 $ref : "#/definitions/Street.v1"
132+ } ,
133+ "masked-street" : {
134+ $ref : "#/definitions/Street.v1_m1"
103135 }
104136 }
105137 } ) ;
0 commit comments