@redocly/config 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.redocConfigSchema = void 0;
4
4
  const feedback_config_schema_1 = require("./feedback-config-schema");
5
+ const reference_docs_config_schema_1 = require("./reference-docs-config-schema");
5
6
  const codeSamplesConfigSchema = {
6
7
  type: 'object',
7
8
  properties: {
@@ -68,53 +69,22 @@ const downloadUrlsSchema = {
68
69
  };
69
70
  exports.redocConfigSchema = {
70
71
  type: 'object',
71
- properties: {
72
- licenseKey: { type: 'string' },
73
- hideLoading: { type: 'boolean' },
74
- disableRouter: { type: 'boolean' },
75
- hideSidebar: { type: 'boolean' },
76
- feedback: feedback_config_schema_1.feedbackConfigSchema,
77
- hideReplay: { type: 'boolean' },
78
- oAuth2RedirectURI: { type: 'string', nullable: true },
79
- corsProxyUrl: { type: 'string' },
80
- sortRequiredPropsFirst: { type: 'boolean' },
81
- sanitize: { type: 'boolean' },
82
- hideDownloadButtons: { type: 'boolean' },
83
- downloadUrls: downloadUrlsSchema,
84
- onlyRequiredInSamples: { type: 'boolean' },
85
- generatedSamplesMaxDepth: { oneOf: [{ type: 'number' }, { type: 'string' }] },
86
- showExtensions: {
72
+ properties: Object.assign(Object.assign({}, reference_docs_config_schema_1.deprecatedRefDocsSchema.properties), { licenseKey: { type: 'string' }, hideLoading: { type: 'boolean' }, disableRouter: { type: 'boolean' }, hideSidebar: { type: 'boolean' }, feedback: feedback_config_schema_1.feedbackConfigSchema, hideReplay: { type: 'boolean' }, oAuth2RedirectURI: { type: 'string', nullable: true }, corsProxyUrl: { type: 'string' }, sortRequiredPropsFirst: { type: 'boolean' }, sanitize: { type: 'boolean' }, hideDownloadButtons: { type: 'boolean' }, downloadUrls: downloadUrlsSchema, onlyRequiredInSamples: { type: 'boolean' }, generatedSamplesMaxDepth: { oneOf: [{ type: 'number' }, { type: 'string' }] }, showExtensions: {
87
73
  oneOf: [
88
74
  { type: 'boolean' },
89
75
  { type: 'string' },
90
76
  { type: 'array', items: { type: 'string' } },
91
77
  ],
92
- },
93
- hideSchemaTitles: { type: 'boolean' },
94
- jsonSamplesExpandLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] },
95
- schemasExpansionLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] },
96
- mockServer: {
78
+ }, hideSchemaTitles: { type: 'boolean' }, jsonSamplesExpandLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] }, schemasExpansionLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] }, mockServer: {
97
79
  type: 'object',
98
80
  properties: {
99
81
  url: { type: 'string' },
100
- position: { enum: ['first', 'last', 'replace', 'off'] },
82
+ position: { type: 'string', enum: ['first', 'last', 'replace', 'off'] },
101
83
  description: { type: 'string' },
102
84
  },
103
- },
104
- maxDisplayedEnumValues: { type: 'number' },
105
- schemaDefinitionsTagName: { type: 'string' },
106
- layout: { type: 'string', enum: ['stacked', 'three-panel'] },
107
- hideInfoMetadata: { type: 'boolean' },
108
- events: { type: 'object' },
109
- skipBundle: { type: 'boolean' },
110
- routingBasePath: { type: 'string' },
111
- codeSamples: codeSamplesConfigSchema,
112
- ignoreNamedSchemas: {
85
+ }, maxDisplayedEnumValues: { type: 'number' }, schemaDefinitionsTagName: { type: 'string' }, layout: { type: 'string', enum: ['stacked', 'three-panel'] }, hideInfoMetadata: { type: 'boolean' }, events: { type: 'object' }, skipBundle: { type: 'boolean' }, routingBasePath: { type: 'string' }, codeSamples: codeSamplesConfigSchema, ignoreNamedSchemas: {
113
86
  oneOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }],
114
- },
115
- hidePropertiesPrefix: { type: 'boolean' },
116
- excludeFromSearch: { type: 'boolean' },
117
- },
87
+ }, hidePropertiesPrefix: { type: 'boolean' }, excludeFromSearch: { type: 'boolean' } }),
118
88
  additionalProperties: false,
119
89
  };
120
90
  //# sourceMappingURL=redoc-config-schema.js.map
@@ -2,7 +2,8 @@ import type { ReactElement, ComponentType } from 'react';
2
2
  import type { FromSchema } from 'json-schema-to-ts';
3
3
  import type { Schema, ConfigFunction } from '@markdoc/markdoc/dist/src/types';
4
4
  import type { redocConfigSchema } from './redoc-config-schema';
5
- export type RedocConfigTypes = FromSchema<typeof redocConfigSchema> & {
5
+ import type { DeprecatedRefDocsConfig } from './reference-docs-config-schema';
6
+ export type RedocConfigTypes = Omit<FromSchema<typeof redocConfigSchema>, keyof DeprecatedRefDocsConfig> & {
6
7
  markdocOptions?: {
7
8
  tags: Record<string, Schema>;
8
9
  nodes: Record<string, Schema>;