@redocly/config 0.7.0 → 0.8.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,5 +1,4 @@
1
1
  import { feedbackConfigSchema } from './feedback-config-schema';
2
- import { deprecatedRefDocsSchema } from './reference-docs-config-schema';
3
2
  const codeSamplesConfigSchema = {
4
3
  type: 'object',
5
4
  properties: {
@@ -66,22 +65,53 @@ const downloadUrlsSchema = {
66
65
  };
67
66
  export const redocConfigSchema = {
68
67
  type: 'object',
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: {
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: {
70
84
  oneOf: [
71
85
  { type: 'boolean' },
72
86
  { type: 'string' },
73
87
  { type: 'array', items: { type: 'string' } },
74
88
  ],
75
- }, hideSchemaTitles: { type: 'boolean' }, jsonSamplesExpandLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] }, schemasExpansionLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] }, mockServer: {
89
+ },
90
+ hideSchemaTitles: { type: 'boolean' },
91
+ jsonSamplesExpandLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] },
92
+ schemasExpansionLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] },
93
+ mockServer: {
76
94
  type: 'object',
77
95
  properties: {
78
96
  url: { type: 'string' },
79
97
  position: { type: 'string', enum: ['first', 'last', 'replace', 'off'] },
80
98
  description: { type: 'string' },
81
99
  },
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: {
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: {
83
110
  oneOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }],
84
- }, hidePropertiesPrefix: { type: 'boolean' }, excludeFromSearch: { type: 'boolean' } }),
111
+ },
112
+ hidePropertiesPrefix: { type: 'boolean' },
113
+ excludeFromSearch: { type: 'boolean' },
114
+ },
85
115
  additionalProperties: false,
86
116
  };
87
117
  //# sourceMappingURL=redoc-config-schema.js.map
@@ -2,8 +2,7 @@ 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
- import type { DeprecatedRefDocsConfig } from './reference-docs-config-schema';
6
- export type RedocConfigTypes = Omit<FromSchema<typeof redocConfigSchema>, keyof DeprecatedRefDocsConfig> & {
5
+ export type RedocConfigTypes = FromSchema<typeof redocConfigSchema> & {
7
6
  markdocOptions?: {
8
7
  tags: Record<string, Schema>;
9
8
  nodes: Record<string, Schema>;
@@ -16,6 +15,7 @@ export type RedocConfigTypes = Omit<FromSchema<typeof redocConfigSchema>, keyof
16
15
  unstable_hooks?: HooksConfig;
17
16
  requestInterceptor?: ((req: Request, operation: OperationModel) => void) | undefined | null;
18
17
  unstable_externalCodeSamples?: Unstable_ExternalCodeSample[];
18
+ unstable_skipSamples?: boolean;
19
19
  scrollYOffset?: number | string | (() => number);
20
20
  };
21
21
  type HooksConfig = {