Files
redocly-cli/__tests__/bundle/bundle-external-value/snapshot.js
2024-10-03 20:00:41 +03:00

60 lines
1.8 KiB
JavaScript

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`E2E bundle bundle-external-value 1`] = `
openapi: 3.1.0
info:
version: 1.0.0
title: Example.com
termsOfService: https://example.com/terms/
contact:
email: contact@example.com
url: http://example.com/contact
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
description: OpenAPI description with external example
security: []
paths:
/:
post:
summary: Test request externalValue with relative reference in examples
requestBody:
content:
application/xml:
schema:
type: object
examples:
test-resolved:
summary: Example should resolved to value
value:
foo: bar
key: value
test-no-resolved:
summary: Example shouldn't be resolved to value
value:
type: object
externalValue: ./external-value.json
components: {}
bundling ./test-success.yaml...
📦 Created a bundle for ./test-success.yaml at stdout <test>ms.
bundling ./test-wrong-examples.yaml...
[1] test-wrong-examples.yaml:27:17 at #/paths/~1/post/requestBody/content/application~1xml/examples/test-wrong-ref
Can't resolve $ref: ENOENT: no such file or directory './__tests__/bundle/bundle-external-value/external-value-bad-path.json'
25 | examples:
26 | test-wrong-ref:
27 | summary: Example shouldn't resolved to value
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28 | externalValue: './external-value-bad-path.json'
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29 |
Error was generated by the bundler rule.
❌ Errors encountered while bundling ./test-wrong-examples.yaml: bundle not created (use --force to ignore errors).
`;