@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.
@@ -1,4 +1,5 @@
1
1
  import { feedbackConfigSchema } from './feedback-config-schema';
2
+ import { deprecatedRefDocsSchema } from './reference-docs-config-schema';
2
3
  const codeSamplesConfigSchema = {
3
4
  type: 'object',
4
5
  properties: {
@@ -65,53 +66,22 @@ const downloadUrlsSchema = {
65
66
  };
66
67
  export const redocConfigSchema = {
67
68
  type: 'object',
68
- properties: {
69
- licenseKey: { type: 'string' },
70
- hideLoading: { type: 'boolean' },
71
- disableRouter: { type: 'boolean' },
72
- hideSidebar: { type: 'boolean' },
73
- feedback: feedbackConfigSchema,
74
- hideReplay: { type: 'boolean' },
75
- oAuth2RedirectURI: { type: 'string', nullable: true },
76
- corsProxyUrl: { type: 'string' },
77
- sortRequiredPropsFirst: { type: 'boolean' },
78
- sanitize: { type: 'boolean' },
79
- hideDownloadButtons: { type: 'boolean' },
80
- downloadUrls: downloadUrlsSchema,
81
- onlyRequiredInSamples: { type: 'boolean' },
82
- generatedSamplesMaxDepth: { oneOf: [{ type: 'number' }, { type: 'string' }] },
83
- showExtensions: {
69
+ properties: Object.assign(Object.assign({}, deprecatedRefDocsSchema.properties), { licenseKey: { type: 'string' }, hideLoading: { type: 'boolean' }, disableRouter: { type: 'boolean' }, hideSidebar: { type: 'boolean' }, feedback: 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: {
84
70
  oneOf: [
85
71
  { type: 'boolean' },
86
72
  { type: 'string' },
87
73
  { type: 'array', items: { type: 'string' } },
88
74
  ],
89
- },
90
- hideSchemaTitles: { type: 'boolean' },
91
- jsonSamplesExpandLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] },
92
- schemasExpansionLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] },
93
- mockServer: {
75
+ }, hideSchemaTitles: { type: 'boolean' }, jsonSamplesExpandLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] }, schemasExpansionLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] }, mockServer: {
94
76
  type: 'object',
95
77
  properties: {
96
78
  url: { type: 'string' },
97
- position: { enum: ['first', 'last', 'replace', 'off'] },
79
+ position: { type: 'string', enum: ['first', 'last', 'replace', 'off'] },
98
80
  description: { type: 'string' },
99
81
  },
100
- },
101
- maxDisplayedEnumValues: { type: 'number' },
102
- schemaDefinitionsTagName: { type: 'string' },
103
- layout: { type: 'string', enum: ['stacked', 'three-panel'] },
104
- hideInfoMetadata: { type: 'boolean' },
105
- events: { type: 'object' },
106
- skipBundle: { type: 'boolean' },
107
- routingBasePath: { type: 'string' },
108
- codeSamples: codeSamplesConfigSchema,
109
- ignoreNamedSchemas: {
82
+ }, 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: {
110
83
  oneOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }],
111
- },
112
- hidePropertiesPrefix: { type: 'boolean' },
113
- excludeFromSearch: { type: 'boolean' },
114
- },
84
+ }, hidePropertiesPrefix: { type: 'boolean' }, excludeFromSearch: { type: 'boolean' } }),
115
85
  additionalProperties: false,
116
86
  };
117
87
  //# 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>;