File tree Expand file tree Collapse file tree 2 files changed +1
-22
lines changed Expand file tree Collapse file tree 2 files changed +1
-22
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,6 @@ const plugin = {
5555 const refPath = splitString [ 0 ]
5656 const pointer = splitString [ 1 ] || ''
5757
58- if ( pointer . length > 0 && pointer [ 0 ] !== '/' ) {
59- console . warn ( `WARNING: $ref '${ ref } ' is malformed, a leading '/' is expected after '#'` )
60- }
61-
6258 let basePath
6359 try {
6460 basePath = ( baseDoc || refPath ) ? absoluteify ( refPath , baseDoc ) : null
Original file line number Diff line number Diff line change 1- import expect , { createSpy } from 'expect'
1+ import expect from 'expect'
22import clone from 'clone'
33import xmock from 'xmock'
44import traverse from 'traverse'
@@ -419,23 +419,6 @@ describe('specmap', function () {
419419 } )
420420 } )
421421
422- it ( 'should warn about malformed JSON Pointers' , function ( ) {
423- // for https://github.com/swagger-api/swagger-editor/issues/1560
424- const oriWarn = console . warn
425- console . warn = createSpy ( ) . andCallThrough ( )
426- return mapSpec ( {
427- spec : {
428- nested : { one : 1 } ,
429- another : { $ref : '#nested' }
430- } ,
431- plugins : [ plugins . refs ]
432- } )
433- . then ( ( res ) => {
434- console . warn = oriWarn
435- expect ( console . warn ) . toHaveBeenCalledWith ( 'WARNING: $ref \'http://example.com/doc-a#two\' is malformed, a leading \'/\' is expected after \'#\'' )
436- } )
437- } )
438-
439422 it ( 'should resolve internal $refs in arrays' , function ( ) {
440423 return mapSpec ( {
441424 spec : {
You can’t perform that action at this time.
0 commit comments