├── .circleci └── config.yml ├── .codeclimate.yml ├── .eslintrc.js ├── .gitignore ├── .prettierrc.js ├── LICENSE ├── README.md ├── jest.config.js ├── package.json ├── src ├── __tests__ │ ├── __snapshots__ │ │ └── parseWithPointers.ts.snap │ ├── bundle.spec.ts │ ├── decodePointer.ts │ ├── decodePointerFragment.ts │ ├── decycle.spec.ts │ ├── encodePointer.ts │ ├── encodePointerFragment.ts │ ├── extractPointerFromRef.spec.ts │ ├── extractSourceFromRef.spec.ts │ ├── fixtures │ │ ├── invalid │ │ │ ├── characters.json │ │ │ └── schema.json │ │ ├── json.ts │ │ ├── multiline-comments.json │ │ ├── petstore.oas2.json │ │ ├── simple.json │ │ ├── todos.oas2.json │ │ ├── user.jschema.json │ │ └── users.json │ ├── getFirstPrimitiveProperty.ts │ ├── getJsonPathForPosition.spec.ts │ ├── getLastPathSegment.spec.ts │ ├── getLocationForJsonPath.spec.ts │ ├── hasRef.spec.ts │ ├── isLocalRef.spec.ts │ ├── isPlainObject.spec.ts │ ├── parseWithPointers.ts │ ├── pathToPointer.ts │ ├── pointerToPath.ts │ ├── renameObjectKeys.spec.ts │ ├── reparentBundleTarget.spec.ts │ ├── resolveExternalRef.spec.ts │ ├── resolveInlineRef.spec.ts │ ├── safeParse.ts │ ├── safeStringify.ts │ ├── startsWith.spec.ts │ ├── stringify.spec.ts │ ├── toPropertyPath.spec.ts │ ├── trapAccess.ts │ ├── traverse.spec.ts │ └── trimStart.spec.ts ├── _utils.ts ├── bundle.ts ├── decodePointer.ts ├── decodePointerFragment.ts ├── decodePointerUriFragment.ts ├── decycle.ts ├── encodePointer.ts ├── encodePointerFragment.ts ├── encodePointerUriFragment.ts ├── encodeUriPointer.ts ├── extractPointerFromRef.ts ├── extractSourceFromRef.ts ├── getFirstPrimitiveProperty.ts ├── getJsonPathForPosition.ts ├── getLastPathSegment.ts ├── getLocationForJsonPath.ts ├── hasRef.ts ├── index.ts ├── isExternalRef.ts ├── isLocalRef.ts ├── isPlainObject.ts ├── parseWithPointers.ts ├── pathToPointer.ts ├── pointerToPath.ts ├── remapRefs.ts ├── renameObjectKey.ts ├── reparentBundleTarget.ts ├── resolvers │ ├── __tests__ │ │ └── resolveSource.spec.ts │ ├── guards.ts │ ├── resolveExternalRef.ts │ ├── resolveInlineRef.ts │ ├── types.ts │ └── utils.ts ├── safeParse.ts ├── safeStringify.ts ├── startsWith.ts ├── stringify.ts ├── toPropertyPath.ts ├── trapAccess.ts ├── traverse.ts ├── trimStart.ts └── types.ts ├── tsconfig.build.json ├── tsconfig.json └── yarn.lock /.circleci/config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/.circleci/config.yml -------------------------------------------------------------------------------- /.codeclimate.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/.codeclimate.yml -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/.gitignore -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/.prettierrc.js -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/README.md -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/jest.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/package.json -------------------------------------------------------------------------------- /src/__tests__/__snapshots__/parseWithPointers.ts.snap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/__snapshots__/parseWithPointers.ts.snap -------------------------------------------------------------------------------- /src/__tests__/bundle.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/bundle.spec.ts -------------------------------------------------------------------------------- /src/__tests__/decodePointer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/decodePointer.ts -------------------------------------------------------------------------------- /src/__tests__/decodePointerFragment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/decodePointerFragment.ts -------------------------------------------------------------------------------- /src/__tests__/decycle.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/decycle.spec.ts -------------------------------------------------------------------------------- /src/__tests__/encodePointer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/encodePointer.ts -------------------------------------------------------------------------------- /src/__tests__/encodePointerFragment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/encodePointerFragment.ts -------------------------------------------------------------------------------- /src/__tests__/extractPointerFromRef.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/extractPointerFromRef.spec.ts -------------------------------------------------------------------------------- /src/__tests__/extractSourceFromRef.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/extractSourceFromRef.spec.ts -------------------------------------------------------------------------------- /src/__tests__/fixtures/invalid/characters.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/fixtures/invalid/characters.json -------------------------------------------------------------------------------- /src/__tests__/fixtures/invalid/schema.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/fixtures/invalid/schema.json -------------------------------------------------------------------------------- /src/__tests__/fixtures/json.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/fixtures/json.ts -------------------------------------------------------------------------------- /src/__tests__/fixtures/multiline-comments.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/fixtures/multiline-comments.json -------------------------------------------------------------------------------- /src/__tests__/fixtures/petstore.oas2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/fixtures/petstore.oas2.json -------------------------------------------------------------------------------- /src/__tests__/fixtures/simple.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/fixtures/simple.json -------------------------------------------------------------------------------- /src/__tests__/fixtures/todos.oas2.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/fixtures/todos.oas2.json -------------------------------------------------------------------------------- /src/__tests__/fixtures/user.jschema.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/fixtures/user.jschema.json -------------------------------------------------------------------------------- /src/__tests__/fixtures/users.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/fixtures/users.json -------------------------------------------------------------------------------- /src/__tests__/getFirstPrimitiveProperty.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/getFirstPrimitiveProperty.ts -------------------------------------------------------------------------------- /src/__tests__/getJsonPathForPosition.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/getJsonPathForPosition.spec.ts -------------------------------------------------------------------------------- /src/__tests__/getLastPathSegment.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/getLastPathSegment.spec.ts -------------------------------------------------------------------------------- /src/__tests__/getLocationForJsonPath.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/getLocationForJsonPath.spec.ts -------------------------------------------------------------------------------- /src/__tests__/hasRef.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/hasRef.spec.ts -------------------------------------------------------------------------------- /src/__tests__/isLocalRef.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/isLocalRef.spec.ts -------------------------------------------------------------------------------- /src/__tests__/isPlainObject.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/isPlainObject.spec.ts -------------------------------------------------------------------------------- /src/__tests__/parseWithPointers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/parseWithPointers.ts -------------------------------------------------------------------------------- /src/__tests__/pathToPointer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/pathToPointer.ts -------------------------------------------------------------------------------- /src/__tests__/pointerToPath.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/pointerToPath.ts -------------------------------------------------------------------------------- /src/__tests__/renameObjectKeys.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/renameObjectKeys.spec.ts -------------------------------------------------------------------------------- /src/__tests__/reparentBundleTarget.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/reparentBundleTarget.spec.ts -------------------------------------------------------------------------------- /src/__tests__/resolveExternalRef.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/resolveExternalRef.spec.ts -------------------------------------------------------------------------------- /src/__tests__/resolveInlineRef.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/resolveInlineRef.spec.ts -------------------------------------------------------------------------------- /src/__tests__/safeParse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/safeParse.ts -------------------------------------------------------------------------------- /src/__tests__/safeStringify.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/safeStringify.ts -------------------------------------------------------------------------------- /src/__tests__/startsWith.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/startsWith.spec.ts -------------------------------------------------------------------------------- /src/__tests__/stringify.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/stringify.spec.ts -------------------------------------------------------------------------------- /src/__tests__/toPropertyPath.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/toPropertyPath.spec.ts -------------------------------------------------------------------------------- /src/__tests__/trapAccess.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/trapAccess.ts -------------------------------------------------------------------------------- /src/__tests__/traverse.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/traverse.spec.ts -------------------------------------------------------------------------------- /src/__tests__/trimStart.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/__tests__/trimStart.spec.ts -------------------------------------------------------------------------------- /src/_utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/_utils.ts -------------------------------------------------------------------------------- /src/bundle.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/bundle.ts -------------------------------------------------------------------------------- /src/decodePointer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/decodePointer.ts -------------------------------------------------------------------------------- /src/decodePointerFragment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/decodePointerFragment.ts -------------------------------------------------------------------------------- /src/decodePointerUriFragment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/decodePointerUriFragment.ts -------------------------------------------------------------------------------- /src/decycle.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/decycle.ts -------------------------------------------------------------------------------- /src/encodePointer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/encodePointer.ts -------------------------------------------------------------------------------- /src/encodePointerFragment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/encodePointerFragment.ts -------------------------------------------------------------------------------- /src/encodePointerUriFragment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/encodePointerUriFragment.ts -------------------------------------------------------------------------------- /src/encodeUriPointer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/encodeUriPointer.ts -------------------------------------------------------------------------------- /src/extractPointerFromRef.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/extractPointerFromRef.ts -------------------------------------------------------------------------------- /src/extractSourceFromRef.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/extractSourceFromRef.ts -------------------------------------------------------------------------------- /src/getFirstPrimitiveProperty.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/getFirstPrimitiveProperty.ts -------------------------------------------------------------------------------- /src/getJsonPathForPosition.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/getJsonPathForPosition.ts -------------------------------------------------------------------------------- /src/getLastPathSegment.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/getLastPathSegment.ts -------------------------------------------------------------------------------- /src/getLocationForJsonPath.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/getLocationForJsonPath.ts -------------------------------------------------------------------------------- /src/hasRef.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/hasRef.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/isExternalRef.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/isExternalRef.ts -------------------------------------------------------------------------------- /src/isLocalRef.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/isLocalRef.ts -------------------------------------------------------------------------------- /src/isPlainObject.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/isPlainObject.ts -------------------------------------------------------------------------------- /src/parseWithPointers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/parseWithPointers.ts -------------------------------------------------------------------------------- /src/pathToPointer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/pathToPointer.ts -------------------------------------------------------------------------------- /src/pointerToPath.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/pointerToPath.ts -------------------------------------------------------------------------------- /src/remapRefs.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/remapRefs.ts -------------------------------------------------------------------------------- /src/renameObjectKey.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/renameObjectKey.ts -------------------------------------------------------------------------------- /src/reparentBundleTarget.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/reparentBundleTarget.ts -------------------------------------------------------------------------------- /src/resolvers/__tests__/resolveSource.spec.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/resolvers/__tests__/resolveSource.spec.ts -------------------------------------------------------------------------------- /src/resolvers/guards.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/resolvers/guards.ts -------------------------------------------------------------------------------- /src/resolvers/resolveExternalRef.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/resolvers/resolveExternalRef.ts -------------------------------------------------------------------------------- /src/resolvers/resolveInlineRef.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/resolvers/resolveInlineRef.ts -------------------------------------------------------------------------------- /src/resolvers/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/resolvers/types.ts -------------------------------------------------------------------------------- /src/resolvers/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/resolvers/utils.ts -------------------------------------------------------------------------------- /src/safeParse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/safeParse.ts -------------------------------------------------------------------------------- /src/safeStringify.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/safeStringify.ts -------------------------------------------------------------------------------- /src/startsWith.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/startsWith.ts -------------------------------------------------------------------------------- /src/stringify.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/stringify.ts -------------------------------------------------------------------------------- /src/toPropertyPath.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/toPropertyPath.ts -------------------------------------------------------------------------------- /src/trapAccess.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/trapAccess.ts -------------------------------------------------------------------------------- /src/traverse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/traverse.ts -------------------------------------------------------------------------------- /src/trimStart.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/trimStart.ts -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/src/types.ts -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/tsconfig.build.json -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/tsconfig.json -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stoplightio/json/HEAD/yarn.lock --------------------------------------------------------------------------------