File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
src/plugins/validate-semantic/validators/2and3
test/plugins/validate-semantic/2and3 Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export const validate2And3RefPathFormatting = () => (system) => {
6464 // eslint-disable-next-line no-unused-vars
6565 const [ refUrl , refPath ] = value . split ( "#" )
6666
67- if ( ! refPath || refPath [ 0 ] !== "/" ) {
67+ if ( refPath && refPath [ 0 ] !== "/" ) {
6868 errors . push ( {
6969 // $ref instead of $$ref
7070 path : [ ...node . path . slice ( 0 , - 1 ) , "$ref" ] ,
Original file line number Diff line number Diff line change @@ -296,11 +296,14 @@ describe("validation plugin - semantic - 2and3 refs", function() {
296296 paths : {
297297 "/CoolPath" : {
298298 $ref : "http://google.com#/myObj/abc"
299- }
299+ } ,
300300 } ,
301301 myObj : {
302302 abc : {
303- type : "string"
303+ type : "string" ,
304+ properties : {
305+ $ref : "http://google.com/MyRegularURLReference"
306+ }
304307 }
305308 }
306309 }
@@ -318,11 +321,14 @@ describe("validation plugin - semantic - 2and3 refs", function() {
318321 paths : {
319322 "/CoolPath" : {
320323 $ref : "http://google.com#/myObj/abc"
321- }
324+ } ,
322325 } ,
323326 myObj : {
324327 abc : {
325- type : "string"
328+ type : "string" ,
329+ properties : {
330+ $ref : "http://google.com/MyRegularURLReference"
331+ }
326332 }
327333 }
328334 }
You can’t perform that action at this time.
0 commit comments