redoc 2.1.5 → 2.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redoc",
3
- "version": "2.1.5",
3
+ "version": "2.3.0",
4
4
  "description": "ReDoc",
5
5
  "repository": {
6
6
  "type": "git",
@@ -61,8 +61,9 @@
61
61
  "pre-commit": "pretty-quick --staged && npm run lint"
62
62
  },
63
63
  "devDependencies": {
64
+ "@cfaester/enzyme-adapter-react-18": "^0.8.0",
64
65
  "@cypress/webpack-preprocessor": "^5.17.1",
65
- "@size-limit/preset-app": "^8.2.6",
66
+ "@size-limit/file": "^11.1.4",
66
67
  "@types/chai": "^4.2.18",
67
68
  "@types/dompurify": "^2.2.2",
68
69
  "@types/enzyme": "^3.10.5",
@@ -114,7 +115,7 @@
114
115
  "react-dom": "^18.0.0",
115
116
  "rimraf": "^3.0.2",
116
117
  "shelljs": "^0.8.4",
117
- "size-limit": "^8.2.6",
118
+ "size-limit": "^11.1.4",
118
119
  "style-loader": "^3.3.1",
119
120
  "styled-components": "^5.3.0",
120
121
  "ts-jest": "^29.1.1",
@@ -123,7 +124,7 @@
123
124
  "typescript": "^4.9.0",
124
125
  "unfetch": "^4.2.0",
125
126
  "url": "^0.11.1",
126
- "webpack": "^5.88.2",
127
+ "webpack": "^5.94.0",
127
128
  "webpack-cli": "^5.1.4",
128
129
  "webpack-dev-server": "^4.15.1",
129
130
  "webpack-node-externals": "^3.0.0",
@@ -137,7 +138,6 @@
137
138
  "styled-components": "^4.1.1 || ^5.1.1 || ^6.0.5"
138
139
  },
139
140
  "dependencies": {
140
- "@cfaester/enzyme-adapter-react-18": "^0.8.0",
141
141
  "@redocly/openapi-core": "^1.4.0",
142
142
  "classnames": "^2.3.2",
143
143
  "decko": "^1.2.0",
@@ -9,4 +9,5 @@ export declare const ShelfIcon: import("styled-components").StyledComponent<(pro
9
9
  }) => JSX.Element, import("../theme").ResolvedThemeInterface, {}, never>;
10
10
  export declare const Badge: import("styled-components").StyledComponent<"span", import("../theme").ResolvedThemeInterface, {
11
11
  type: string;
12
+ color?: string | undefined;
12
13
  }, never>;
@@ -3,6 +3,7 @@ export declare const OperationBadge: import("styled-components").StyledComponent
3
3
  className: `operation-type ${string}`;
4
4
  } & {
5
5
  type: string;
6
+ color?: string | undefined;
6
7
  }, "className">;
7
8
  export declare const MenuItemUl: import("styled-components").StyledComponent<"ul", ResolvedThemeInterface, {
8
9
  $expanded: boolean;
@@ -4,7 +4,7 @@ import { CallbackModel } from './Callback';
4
4
  import { FieldModel } from './Field';
5
5
  import { RequestBodyModel } from './RequestBody';
6
6
  import { ResponseModel } from './Response';
7
- import type { OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXCodeSample } from '../../types';
7
+ import type { OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXBadges, OpenAPIXCodeSample } from '../../types';
8
8
  import type { OpenAPIParser } from '../OpenAPIParser';
9
9
  import type { RedocNormalizedOptions } from '../RedocNormalizedOptions';
10
10
  import type { MediaContentModel } from './MediaContent';
@@ -40,6 +40,7 @@ export declare class OperationModel implements IMenuItem {
40
40
  operationId?: string;
41
41
  operationHash?: string;
42
42
  httpVerb: string;
43
+ badges: OpenAPIXBadges[];
43
44
  deprecated: boolean;
44
45
  path: string;
45
46
  servers: OpenAPIServer[];
@@ -62,6 +62,11 @@ export interface OpenAPIXCodeSample {
62
62
  label?: string;
63
63
  source: string;
64
64
  }
65
+ export interface OpenAPIXBadges {
66
+ name: string;
67
+ color?: string;
68
+ position?: 'before' | 'after';
69
+ }
65
70
  export interface OpenAPIOperation {
66
71
  tags?: string[];
67
72
  summary?: string;
@@ -79,6 +84,7 @@ export interface OpenAPIOperation {
79
84
  servers?: OpenAPIServer[];
80
85
  'x-codeSamples'?: OpenAPIXCodeSample[];
81
86
  'x-code-samples'?: OpenAPIXCodeSample[];
87
+ 'x-badges'?: OpenAPIXBadges[];
82
88
  }
83
89
  export interface OpenAPIParameter {
84
90
  name: string;
@@ -70,6 +70,12 @@ export interface OpenAPIXCodeSample {
70
70
  source: string;
71
71
  }
72
72
 
73
+ export interface OpenAPIXBadges {
74
+ name: string;
75
+ color?: string;
76
+ position?: 'before' | 'after';
77
+ }
78
+
73
79
  export interface OpenAPIOperation {
74
80
  tags?: string[];
75
81
  summary?: string;
@@ -85,6 +91,7 @@ export interface OpenAPIOperation {
85
91
  servers?: OpenAPIServer[];
86
92
  'x-codeSamples'?: OpenAPIXCodeSample[];
87
93
  'x-code-samples'?: OpenAPIXCodeSample[]; // deprecated
94
+ 'x-badges'?: OpenAPIXBadges[];
88
95
  }
89
96
 
90
97
  export interface OpenAPIParameter {
@@ -17,7 +17,7 @@ export declare function serializeParameterValueWithMime(value: any, mime: string
17
17
  export declare function serializeParameterValue(parameter: (OpenAPIParameter & {
18
18
  serializationMime?: string;
19
19
  }) | FieldModel, value: any): string;
20
- export declare function getSerializedValue(field: FieldModel, example: any): string;
20
+ export declare function getSerializedValue(field: FieldModel, example: any): any;
21
21
  export declare function langFromMime(contentType: string): string;
22
22
  export declare function isNamedDefinition(pointer?: string): boolean;
23
23
  export declare function getDefinitionName(pointer?: string): string | undefined;