@jsango/openapi 1.0.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/LICENSE +21 -0
- package/README.md +29 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/public/admin-adapter.d.ts +26 -0
- package/dist/public/admin-adapter.d.ts.map +1 -0
- package/dist/public/admin-adapter.js +120 -0
- package/dist/public/admin-adapter.js.map +1 -0
- package/dist/public/endpoint.d.ts +13 -0
- package/dist/public/endpoint.d.ts.map +1 -0
- package/dist/public/endpoint.js +38 -0
- package/dist/public/endpoint.js.map +1 -0
- package/dist/public/errors.d.ts +15 -0
- package/dist/public/errors.d.ts.map +1 -0
- package/dist/public/errors.js +32 -0
- package/dist/public/errors.js.map +1 -0
- package/dist/public/formatter.d.ts +13 -0
- package/dist/public/formatter.d.ts.map +1 -0
- package/dist/public/formatter.js +77 -0
- package/dist/public/formatter.js.map +1 -0
- package/dist/public/generator.d.ts +37 -0
- package/dist/public/generator.d.ts.map +1 -0
- package/dist/public/generator.js +217 -0
- package/dist/public/generator.js.map +1 -0
- package/dist/public/index.d.ts +12 -0
- package/dist/public/index.d.ts.map +1 -0
- package/dist/public/index.js +11 -0
- package/dist/public/index.js.map +1 -0
- package/dist/public/orm-adapter.d.ts +28 -0
- package/dist/public/orm-adapter.d.ts.map +1 -0
- package/dist/public/orm-adapter.js +97 -0
- package/dist/public/orm-adapter.js.map +1 -0
- package/dist/public/registry.d.ts +51 -0
- package/dist/public/registry.d.ts.map +1 -0
- package/dist/public/registry.js +106 -0
- package/dist/public/registry.js.map +1 -0
- package/dist/public/schema-builder.d.ts +29 -0
- package/dist/public/schema-builder.d.ts.map +1 -0
- package/dist/public/schema-builder.js +117 -0
- package/dist/public/schema-builder.js.map +1 -0
- package/dist/public/types.d.ts +198 -0
- package/dist/public/types.d.ts.map +1 -0
- package/dist/public/types.js +2 -0
- package/dist/public/types.js.map +1 -0
- package/dist/public/validation-adapter.d.ts +24 -0
- package/dist/public/validation-adapter.d.ts.map +1 -0
- package/dist/public/validation-adapter.js +57 -0
- package/dist/public/validation-adapter.js.map +1 -0
- package/dist/public/validator.d.ts +14 -0
- package/dist/public/validator.d.ts.map +1 -0
- package/dist/public/validator.js +107 -0
- package/dist/public/validator.js.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
export class SchemaBuilder {
|
|
2
|
+
static string(options = {}) {
|
|
3
|
+
return { type: 'string', ...options };
|
|
4
|
+
}
|
|
5
|
+
static number(options = {}) {
|
|
6
|
+
return { type: 'number', ...options };
|
|
7
|
+
}
|
|
8
|
+
static integer(options = {}) {
|
|
9
|
+
return { type: 'integer', ...options };
|
|
10
|
+
}
|
|
11
|
+
static boolean(options = {}) {
|
|
12
|
+
return { type: 'boolean', ...options };
|
|
13
|
+
}
|
|
14
|
+
static uuid(options = {}) {
|
|
15
|
+
return { type: 'string', format: 'uuid', ...options };
|
|
16
|
+
}
|
|
17
|
+
static dateTime(options = {}) {
|
|
18
|
+
return { type: 'string', format: 'date-time', ...options };
|
|
19
|
+
}
|
|
20
|
+
static date(options = {}) {
|
|
21
|
+
return { type: 'string', format: 'date', ...options };
|
|
22
|
+
}
|
|
23
|
+
static email(options = {}) {
|
|
24
|
+
return { type: 'string', format: 'email', ...options };
|
|
25
|
+
}
|
|
26
|
+
static binary(options = {}) {
|
|
27
|
+
return { type: 'string', format: 'binary', ...options };
|
|
28
|
+
}
|
|
29
|
+
static array(items, options = {}) {
|
|
30
|
+
return { type: 'array', items, ...options };
|
|
31
|
+
}
|
|
32
|
+
static object(properties, required = [], options = {}) {
|
|
33
|
+
return {
|
|
34
|
+
type: 'object',
|
|
35
|
+
properties,
|
|
36
|
+
...(required.length > 0 ? { required } : {}),
|
|
37
|
+
...options,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static enum(values, options = {}) {
|
|
41
|
+
const type = typeof values[0] === 'number' ? 'number' : 'string';
|
|
42
|
+
return { type, enum: values, ...options };
|
|
43
|
+
}
|
|
44
|
+
static ref(schemaName) {
|
|
45
|
+
return { $ref: `#/components/schemas/${schemaName}` };
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Reusable error response schema matching framework's JsangoError / HTTP error format.
|
|
49
|
+
*/
|
|
50
|
+
static errorResponse() {
|
|
51
|
+
return {
|
|
52
|
+
type: 'object',
|
|
53
|
+
required: ['ok', 'error'],
|
|
54
|
+
properties: {
|
|
55
|
+
ok: { type: 'boolean', example: false },
|
|
56
|
+
error: {
|
|
57
|
+
type: 'object',
|
|
58
|
+
required: ['code', 'message'],
|
|
59
|
+
properties: {
|
|
60
|
+
code: { type: 'string', example: 'ERR_NOT_FOUND' },
|
|
61
|
+
message: { type: 'string', example: 'Resource not found' },
|
|
62
|
+
meta: { type: 'object', additionalProperties: true },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Reusable validation error response schema matching @jsango/validation format.
|
|
70
|
+
*/
|
|
71
|
+
static validationErrorResponse() {
|
|
72
|
+
return {
|
|
73
|
+
type: 'object',
|
|
74
|
+
required: ['ok', 'error'],
|
|
75
|
+
properties: {
|
|
76
|
+
ok: { type: 'boolean', example: false },
|
|
77
|
+
error: {
|
|
78
|
+
type: 'object',
|
|
79
|
+
required: ['code', 'message', 'errors'],
|
|
80
|
+
properties: {
|
|
81
|
+
code: { type: 'string', example: 'ERR_VALIDATION' },
|
|
82
|
+
message: { type: 'string', example: 'Validation failed' },
|
|
83
|
+
errors: {
|
|
84
|
+
type: 'array',
|
|
85
|
+
items: {
|
|
86
|
+
type: 'object',
|
|
87
|
+
required: ['field', 'message'],
|
|
88
|
+
properties: {
|
|
89
|
+
field: { type: 'string', example: 'email' },
|
|
90
|
+
message: { type: 'string', example: 'Invalid email address format' },
|
|
91
|
+
code: { type: 'string', example: 'invalid_email' },
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Standard paginated response schema.
|
|
102
|
+
*/
|
|
103
|
+
static paginated(itemSchema) {
|
|
104
|
+
return {
|
|
105
|
+
type: 'object',
|
|
106
|
+
required: ['items', 'total', 'page', 'pageSize', 'totalPages'],
|
|
107
|
+
properties: {
|
|
108
|
+
items: { type: 'array', items: itemSchema },
|
|
109
|
+
total: { type: 'integer', minimum: 0 },
|
|
110
|
+
page: { type: 'integer', minimum: 1 },
|
|
111
|
+
pageSize: { type: 'integer', minimum: 1 },
|
|
112
|
+
totalPages: { type: 'integer', minimum: 0 },
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=schema-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-builder.js","sourceRoot":"","sources":["../../src/public/schema-builder.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,aAAa;IACjB,MAAM,CAAC,MAAM,CAAC,UAAkC,EAAE;QACvD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;IACxC,CAAC;IAEM,MAAM,CAAC,MAAM,CAAC,UAAkC,EAAE;QACvD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;IACxC,CAAC;IAEM,MAAM,CAAC,OAAO,CAAC,UAAkC,EAAE;QACxD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE,CAAC;IACzC,CAAC;IAEM,MAAM,CAAC,OAAO,CAAC,UAAkC,EAAE;QACxD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE,CAAC;IACzC,CAAC;IAEM,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|
|
1
|
+
/**
|
|
2
|
+
* Supported OpenAPI specifications.
|
|
3
|
+
* Defaults to 3.1.0 (latest stable) while supporting 3.0.3 generation mode.
|
|
4
|
+
*/
|
|
5
|
+
export type OpenApiVersion = '3.1.0' | '3.0.3';
|
|
6
|
+
export interface OpenApiContact {
|
|
7
|
+
readonly name?: string | undefined;
|
|
8
|
+
readonly url?: string | undefined;
|
|
9
|
+
readonly email?: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface OpenApiLicense {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly identifier?: string | undefined;
|
|
14
|
+
readonly url?: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface OpenApiInfo {
|
|
17
|
+
readonly title: string;
|
|
18
|
+
readonly version: string;
|
|
19
|
+
readonly description?: string | undefined;
|
|
20
|
+
readonly termsOfService?: string | undefined;
|
|
21
|
+
readonly contact?: OpenApiContact | undefined;
|
|
22
|
+
readonly license?: OpenApiLicense | undefined;
|
|
23
|
+
}
|
|
24
|
+
export interface OpenApiServerVariable {
|
|
25
|
+
readonly default: string;
|
|
26
|
+
readonly description?: string | undefined;
|
|
27
|
+
readonly enum?: readonly string[] | undefined;
|
|
28
|
+
}
|
|
29
|
+
export interface OpenApiServer {
|
|
30
|
+
readonly url: string;
|
|
31
|
+
readonly description?: string | undefined;
|
|
32
|
+
readonly variables?: Record<string, OpenApiServerVariable> | undefined;
|
|
33
|
+
}
|
|
34
|
+
export type OpenApiParameterIn = 'path' | 'query' | 'header' | 'cookie';
|
|
35
|
+
export interface OpenApiParameter {
|
|
36
|
+
readonly name: string;
|
|
37
|
+
readonly in: OpenApiParameterIn;
|
|
38
|
+
readonly description?: string | undefined;
|
|
39
|
+
readonly required?: boolean | undefined;
|
|
40
|
+
readonly deprecated?: boolean | undefined;
|
|
41
|
+
readonly allowEmptyValue?: boolean | undefined;
|
|
42
|
+
readonly schema?: OpenApiSchema | undefined;
|
|
43
|
+
readonly example?: unknown;
|
|
44
|
+
readonly examples?: Record<string, {
|
|
45
|
+
summary?: string;
|
|
46
|
+
value: unknown;
|
|
47
|
+
}> | undefined;
|
|
48
|
+
}
|
|
49
|
+
export interface OpenApiMediaType {
|
|
50
|
+
readonly schema?: OpenApiSchema | undefined;
|
|
51
|
+
readonly example?: unknown;
|
|
52
|
+
readonly examples?: Record<string, {
|
|
53
|
+
summary?: string;
|
|
54
|
+
value: unknown;
|
|
55
|
+
}> | undefined;
|
|
56
|
+
}
|
|
57
|
+
export interface OpenApiRequestBody {
|
|
58
|
+
readonly description?: string | undefined;
|
|
59
|
+
readonly required?: boolean | undefined;
|
|
60
|
+
readonly content: Record<string, OpenApiMediaType>;
|
|
61
|
+
}
|
|
62
|
+
export interface OpenApiHeader {
|
|
63
|
+
readonly description?: string | undefined;
|
|
64
|
+
readonly required?: boolean | undefined;
|
|
65
|
+
readonly deprecated?: boolean | undefined;
|
|
66
|
+
readonly schema?: OpenApiSchema | undefined;
|
|
67
|
+
}
|
|
68
|
+
export interface OpenApiResponse {
|
|
69
|
+
readonly description: string;
|
|
70
|
+
readonly headers?: Record<string, OpenApiHeader> | undefined;
|
|
71
|
+
readonly content?: Record<string, OpenApiMediaType> | undefined;
|
|
72
|
+
}
|
|
73
|
+
export type OpenApiResponses = Record<string, OpenApiResponse>;
|
|
74
|
+
export type OpenApiSecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
75
|
+
export interface OpenApiSecurityScheme {
|
|
76
|
+
readonly type: OpenApiSecuritySchemeType;
|
|
77
|
+
readonly description?: string | undefined;
|
|
78
|
+
readonly name?: string | undefined;
|
|
79
|
+
readonly in?: 'query' | 'header' | 'cookie' | undefined;
|
|
80
|
+
readonly scheme?: string | undefined;
|
|
81
|
+
readonly bearerFormat?: string | undefined;
|
|
82
|
+
readonly openIdConnectUrl?: string | undefined;
|
|
83
|
+
readonly flows?: Record<string, unknown> | undefined;
|
|
84
|
+
}
|
|
85
|
+
export type OpenApiSecurityRequirement = Record<string, readonly string[]>;
|
|
86
|
+
export interface OpenApiTag {
|
|
87
|
+
readonly name: string;
|
|
88
|
+
readonly description?: string | undefined;
|
|
89
|
+
readonly externalDocs?: {
|
|
90
|
+
description?: string;
|
|
91
|
+
url: string;
|
|
92
|
+
} | undefined;
|
|
93
|
+
}
|
|
94
|
+
export interface OpenApiSchema {
|
|
95
|
+
readonly type?: string | readonly string[] | undefined;
|
|
96
|
+
readonly format?: string | undefined;
|
|
97
|
+
readonly title?: string | undefined;
|
|
98
|
+
readonly description?: string | undefined;
|
|
99
|
+
readonly default?: unknown;
|
|
100
|
+
readonly multipleOf?: number | undefined;
|
|
101
|
+
readonly maximum?: number | undefined;
|
|
102
|
+
readonly exclusiveMaximum?: number | boolean | undefined;
|
|
103
|
+
readonly minimum?: number | undefined;
|
|
104
|
+
readonly exclusiveMinimum?: number | boolean | undefined;
|
|
105
|
+
readonly maxLength?: number | undefined;
|
|
106
|
+
readonly minLength?: number | undefined;
|
|
107
|
+
readonly pattern?: string | undefined;
|
|
108
|
+
readonly maxItems?: number | undefined;
|
|
109
|
+
readonly minItems?: number | undefined;
|
|
110
|
+
readonly uniqueItems?: boolean | undefined;
|
|
111
|
+
readonly maxProperties?: number | undefined;
|
|
112
|
+
readonly minProperties?: number | undefined;
|
|
113
|
+
readonly required?: readonly string[] | undefined;
|
|
114
|
+
readonly enum?: readonly unknown[] | undefined;
|
|
115
|
+
readonly items?: OpenApiSchema | undefined;
|
|
116
|
+
readonly properties?: Record<string, OpenApiSchema> | undefined;
|
|
117
|
+
readonly additionalProperties?: boolean | OpenApiSchema | undefined;
|
|
118
|
+
readonly nullable?: boolean | undefined;
|
|
119
|
+
readonly readOnly?: boolean | undefined;
|
|
120
|
+
readonly writeOnly?: boolean | undefined;
|
|
121
|
+
readonly example?: unknown;
|
|
122
|
+
readonly examples?: readonly unknown[] | undefined;
|
|
123
|
+
readonly deprecated?: boolean | undefined;
|
|
124
|
+
readonly $ref?: string | undefined;
|
|
125
|
+
readonly allOf?: readonly OpenApiSchema[] | undefined;
|
|
126
|
+
readonly anyOf?: readonly OpenApiSchema[] | undefined;
|
|
127
|
+
readonly oneOf?: readonly OpenApiSchema[] | undefined;
|
|
128
|
+
readonly not?: OpenApiSchema | undefined;
|
|
129
|
+
readonly [key: `x-${string}`]: unknown;
|
|
130
|
+
}
|
|
131
|
+
export interface OpenApiOperation {
|
|
132
|
+
readonly tags?: readonly string[] | undefined;
|
|
133
|
+
readonly summary?: string | undefined;
|
|
134
|
+
readonly description?: string | undefined;
|
|
135
|
+
readonly operationId?: string | undefined;
|
|
136
|
+
readonly parameters?: readonly OpenApiParameter[] | undefined;
|
|
137
|
+
readonly requestBody?: OpenApiRequestBody | undefined;
|
|
138
|
+
readonly responses: OpenApiResponses;
|
|
139
|
+
readonly deprecated?: boolean | undefined;
|
|
140
|
+
readonly security?: readonly OpenApiSecurityRequirement[] | undefined;
|
|
141
|
+
readonly servers?: readonly OpenApiServer[] | undefined;
|
|
142
|
+
readonly [key: `x-${string}`]: unknown;
|
|
143
|
+
}
|
|
144
|
+
export interface OpenApiPathItem {
|
|
145
|
+
readonly summary?: string | undefined;
|
|
146
|
+
readonly description?: string | undefined;
|
|
147
|
+
readonly get?: OpenApiOperation | undefined;
|
|
148
|
+
readonly put?: OpenApiOperation | undefined;
|
|
149
|
+
readonly post?: OpenApiOperation | undefined;
|
|
150
|
+
readonly delete?: OpenApiOperation | undefined;
|
|
151
|
+
readonly options?: OpenApiOperation | undefined;
|
|
152
|
+
readonly head?: OpenApiOperation | undefined;
|
|
153
|
+
readonly patch?: OpenApiOperation | undefined;
|
|
154
|
+
readonly trace?: OpenApiOperation | undefined;
|
|
155
|
+
readonly servers?: readonly OpenApiServer[] | undefined;
|
|
156
|
+
readonly parameters?: readonly OpenApiParameter[] | undefined;
|
|
157
|
+
}
|
|
158
|
+
export type OpenApiPaths = Record<string, OpenApiPathItem>;
|
|
159
|
+
export interface OpenApiComponents {
|
|
160
|
+
readonly schemas?: Record<string, OpenApiSchema> | undefined;
|
|
161
|
+
readonly responses?: Record<string, OpenApiResponse> | undefined;
|
|
162
|
+
readonly parameters?: Record<string, OpenApiParameter> | undefined;
|
|
163
|
+
readonly requestBodies?: Record<string, OpenApiRequestBody> | undefined;
|
|
164
|
+
readonly securitySchemes?: Record<string, OpenApiSecurityScheme> | undefined;
|
|
165
|
+
readonly headers?: Record<string, OpenApiHeader> | undefined;
|
|
166
|
+
}
|
|
167
|
+
export interface OpenApiDocument {
|
|
168
|
+
readonly openapi: OpenApiVersion;
|
|
169
|
+
readonly info: OpenApiInfo;
|
|
170
|
+
readonly servers?: readonly OpenApiServer[] | undefined;
|
|
171
|
+
readonly paths: OpenApiPaths;
|
|
172
|
+
readonly components?: OpenApiComponents | undefined;
|
|
173
|
+
readonly security?: readonly OpenApiSecurityRequirement[] | undefined;
|
|
174
|
+
readonly tags?: readonly OpenApiTag[] | undefined;
|
|
175
|
+
readonly externalDocs?: {
|
|
176
|
+
description?: string;
|
|
177
|
+
url: string;
|
|
178
|
+
} | undefined;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Route metadata format for explicitly specifying OpenAPI information on routes.
|
|
182
|
+
* Attached via route options: `{ metadata: { openapi: { ... } } }`.
|
|
183
|
+
*/
|
|
184
|
+
export interface OpenApiRouteMetadata {
|
|
185
|
+
readonly summary?: string | undefined;
|
|
186
|
+
readonly description?: string | undefined;
|
|
187
|
+
readonly operationId?: string | undefined;
|
|
188
|
+
readonly tags?: readonly string[] | undefined;
|
|
189
|
+
readonly deprecated?: boolean | undefined;
|
|
190
|
+
readonly parameters?: readonly OpenApiParameter[] | undefined;
|
|
191
|
+
readonly requestBody?: OpenApiRequestBody | undefined;
|
|
192
|
+
readonly responses?: OpenApiResponses | undefined;
|
|
193
|
+
readonly security?: readonly OpenApiSecurityRequirement[] | undefined;
|
|
194
|
+
readonly hidden?: boolean | undefined;
|
|
195
|
+
readonly excludeFromOpenApi?: boolean | undefined;
|
|
196
|
+
readonly [key: `x-${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G,SAAS,CAAC;IAC1C,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,gBAAgB,EAAE,GAAG,SAAS,CAAC;IAC9D,QAAQ,CAAC,WAAW,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACtD,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,0BAA0B,EAAE,GAAG,SAAS,CAAC;IACtE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClD,QAAQ,EAAE,GAAG,EAAE,KAAK,MAAM,EAAE,GAAG,OAAO,CAAC;CACxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/public/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { OpenApiSchema } from './types.js';
|
|
2
|
+
export interface ValidationSchemaDescriptor {
|
|
3
|
+
readonly type?: string | undefined;
|
|
4
|
+
readonly format?: string | undefined;
|
|
5
|
+
readonly required?: readonly string[] | boolean | undefined;
|
|
6
|
+
readonly properties?: Record<string, ValidationSchemaDescriptor> | undefined;
|
|
7
|
+
readonly items?: ValidationSchemaDescriptor | undefined;
|
|
8
|
+
readonly enum?: readonly unknown[] | undefined;
|
|
9
|
+
readonly minimum?: number | undefined;
|
|
10
|
+
readonly maximum?: number | undefined;
|
|
11
|
+
readonly minLength?: number | undefined;
|
|
12
|
+
readonly maxLength?: number | undefined;
|
|
13
|
+
readonly pattern?: string | undefined;
|
|
14
|
+
readonly description?: string | undefined;
|
|
15
|
+
readonly default?: unknown;
|
|
16
|
+
readonly nullable?: boolean | undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare class ValidationAdapter {
|
|
19
|
+
/**
|
|
20
|
+
* Converts validation descriptor/metadata into a valid OpenApiSchema.
|
|
21
|
+
*/
|
|
22
|
+
static toOpenApiSchema(descriptor: ValidationSchemaDescriptor | unknown): OpenApiSchema;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=validation-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-adapter.d.ts","sourceRoot":"","sources":["../../src/public/validation-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,GAAG,SAAS,CAAC;IAC5D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,GAAG,SAAS,CAAC;IAC7E,QAAQ,CAAC,KAAK,CAAC,EAAE,0BAA0B,GAAG,SAAS,CAAC;IACxD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACzC;AAED,qBAAa,iBAAiB;IAC5B;;OAEG;WACW,eAAe,CAAC,UAAU,EAAE,0BAA0B,GAAG,OAAO,GAAG,aAAa;CA+C/F"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export class ValidationAdapter {
|
|
2
|
+
/**
|
|
3
|
+
* Converts validation descriptor/metadata into a valid OpenApiSchema.
|
|
4
|
+
*/
|
|
5
|
+
static toOpenApiSchema(descriptor) {
|
|
6
|
+
if (!descriptor || typeof descriptor !== 'object') {
|
|
7
|
+
return { type: 'string' };
|
|
8
|
+
}
|
|
9
|
+
const d = descriptor;
|
|
10
|
+
const schema = {};
|
|
11
|
+
if (d.type)
|
|
12
|
+
schema['type'] = d.type;
|
|
13
|
+
if (d.format)
|
|
14
|
+
schema['format'] = d.format;
|
|
15
|
+
if (d.description)
|
|
16
|
+
schema['description'] = d.description;
|
|
17
|
+
if (d.default !== undefined)
|
|
18
|
+
schema['default'] = d.default;
|
|
19
|
+
if (d.minimum !== undefined)
|
|
20
|
+
schema['minimum'] = d.minimum;
|
|
21
|
+
if (d.maximum !== undefined)
|
|
22
|
+
schema['maximum'] = d.maximum;
|
|
23
|
+
if (d.minLength !== undefined)
|
|
24
|
+
schema['minLength'] = d.minLength;
|
|
25
|
+
if (d.maxLength !== undefined)
|
|
26
|
+
schema['maxLength'] = d.maxLength;
|
|
27
|
+
if (d.pattern !== undefined)
|
|
28
|
+
schema['pattern'] = d.pattern;
|
|
29
|
+
if (d.enum !== undefined)
|
|
30
|
+
schema['enum'] = d.enum;
|
|
31
|
+
if (d.nullable !== undefined)
|
|
32
|
+
schema['nullable'] = d.nullable;
|
|
33
|
+
if (d.type === 'array' && d.items) {
|
|
34
|
+
schema['items'] = ValidationAdapter.toOpenApiSchema(d.items);
|
|
35
|
+
}
|
|
36
|
+
if (d.properties) {
|
|
37
|
+
const props = {};
|
|
38
|
+
const requiredFields = [];
|
|
39
|
+
for (const [key, propDescriptor] of Object.entries(d.properties)) {
|
|
40
|
+
props[key] = ValidationAdapter.toOpenApiSchema(propDescriptor);
|
|
41
|
+
if (propDescriptor.required === true) {
|
|
42
|
+
requiredFields.push(key);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
schema['type'] = 'object';
|
|
46
|
+
schema['properties'] = props;
|
|
47
|
+
if (Array.isArray(d.required)) {
|
|
48
|
+
schema['required'] = d.required;
|
|
49
|
+
}
|
|
50
|
+
else if (requiredFields.length > 0) {
|
|
51
|
+
schema['required'] = requiredFields;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return schema;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=validation-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-adapter.js","sourceRoot":"","sources":["../../src/public/validation-adapter.ts"],"names":[],"mappings":"AAmBA,MAAM,OAAO,iBAAiB;IAC5B;;OAEG;IACI,MAAM,CAAC,eAAe,CAAC,UAAgD;QAC5E,IAAI,CAAC,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;YAClD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC5B,CAAC;QAED,MAAM,CAAC,GAAG,UAAwC,CAAC;QACnD,MAAM,MAAM,GAA4B,EAAE,CAAC;QAE3C,IAAI,CAAC,CAAC,IAAI;YAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;QACpC,IAAI,CAAC,CAAC,MAAM;YAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;QAC1C,IAAI,CAAC,CAAC,WAAW;YAAE,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC;QACzD,IAAI,CAAC,CAAC,OAAO,KAAK,SAAS;YAAE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,OAA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C/D,IAAI,cAAc,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;oBACrC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC3B,CAAC;YACH,CAAC;YAED,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;YAC1B,MAAM,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC;YAE7B,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC9B,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC;YAClC,CAAC;iBAAM,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACrC,MAAM,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC;YACtC,CAAC;QACH,CAAC;QAED,OAAO,MAAuB,CAAC;IACjC,CAAC;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { OpenApiDocument } from './types.js';
|
|
2
|
+
export declare class OpenApiValidator {
|
|
3
|
+
/**
|
|
4
|
+
* Validates an OpenApiDocument.
|
|
5
|
+
* Returns an array of validation error messages (empty if valid).
|
|
6
|
+
*/
|
|
7
|
+
static validate(doc: OpenApiDocument): string[];
|
|
8
|
+
/**
|
|
9
|
+
* Asserts that an OpenApiDocument is valid, throwing InvalidOpenApiDocumentError if not.
|
|
10
|
+
*/
|
|
11
|
+
static assertValid(doc: OpenApiDocument): void;
|
|
12
|
+
private static validateRefs;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/public/validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,qBAAa,gBAAgB;IAC3B;;;OAGG;WACW,QAAQ,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,EAAE;IAoFtD;;OAEG;WACW,WAAW,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IAOrD,OAAO,CAAC,MAAM,CAAC,YAAY;CA0B5B"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { InvalidOpenApiDocumentError } from './errors.js';
|
|
2
|
+
export class OpenApiValidator {
|
|
3
|
+
/**
|
|
4
|
+
* Validates an OpenApiDocument.
|
|
5
|
+
* Returns an array of validation error messages (empty if valid).
|
|
6
|
+
*/
|
|
7
|
+
static validate(doc) {
|
|
8
|
+
const errors = [];
|
|
9
|
+
if (!doc.openapi) {
|
|
10
|
+
errors.push('Missing required top-level "openapi" version string.');
|
|
11
|
+
}
|
|
12
|
+
if (!doc.info) {
|
|
13
|
+
errors.push('Missing required top-level "info" object.');
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
if (!doc.info.title)
|
|
17
|
+
errors.push('Missing required "info.title".');
|
|
18
|
+
if (!doc.info.version)
|
|
19
|
+
errors.push('Missing required "info.version".');
|
|
20
|
+
}
|
|
21
|
+
if (!doc.paths || typeof doc.paths !== 'object') {
|
|
22
|
+
errors.push('Missing required top-level "paths" object.');
|
|
23
|
+
return errors;
|
|
24
|
+
}
|
|
25
|
+
const operationIds = new Set();
|
|
26
|
+
for (const [pathKey, pathItem] of Object.entries(doc.paths)) {
|
|
27
|
+
if (!pathKey.startsWith('/')) {
|
|
28
|
+
errors.push(`Path "${pathKey}" must start with a forward slash "/".`);
|
|
29
|
+
}
|
|
30
|
+
// Extract path parameter names from `{param}`
|
|
31
|
+
const pathParamMatches = Array.from(pathKey.matchAll(/\{([a-zA-Z0-9_]+)\}/g)).map((m) => m[1]);
|
|
32
|
+
const methods = [
|
|
33
|
+
'get',
|
|
34
|
+
'post',
|
|
35
|
+
'put',
|
|
36
|
+
'patch',
|
|
37
|
+
'delete',
|
|
38
|
+
'options',
|
|
39
|
+
'head',
|
|
40
|
+
'trace',
|
|
41
|
+
];
|
|
42
|
+
for (const method of methods) {
|
|
43
|
+
const op = pathItem[method];
|
|
44
|
+
if (!op)
|
|
45
|
+
continue;
|
|
46
|
+
if (op.operationId) {
|
|
47
|
+
if (operationIds.has(op.operationId)) {
|
|
48
|
+
errors.push(`Duplicate operationId "${op.operationId}" found in ${method.toUpperCase()} ${pathKey}.`);
|
|
49
|
+
}
|
|
50
|
+
operationIds.add(op.operationId);
|
|
51
|
+
}
|
|
52
|
+
if (!op.responses || Object.keys(op.responses).length === 0) {
|
|
53
|
+
errors.push(`Operation ${method.toUpperCase()} ${pathKey} must define at least one response in "responses".`);
|
|
54
|
+
}
|
|
55
|
+
// Verify required path parameters
|
|
56
|
+
const opParams = [...(pathItem.parameters ?? []), ...(op.parameters ?? [])];
|
|
57
|
+
for (const paramName of pathParamMatches) {
|
|
58
|
+
const found = opParams.find((p) => p.in === 'path' && p.name === paramName);
|
|
59
|
+
if (!found) {
|
|
60
|
+
errors.push(`Path "${pathKey}" defines parameter "{${paramName}}" but operation ${method.toUpperCase()} does not define a matching path parameter.`);
|
|
61
|
+
}
|
|
62
|
+
else if (!found.required) {
|
|
63
|
+
errors.push(`Path parameter "${paramName}" in ${method.toUpperCase()} ${pathKey} must have "required: true".`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Verify component $ref references
|
|
69
|
+
const availableSchemas = new Set(Object.keys(doc.components?.schemas ?? {}));
|
|
70
|
+
this.validateRefs(doc, availableSchemas, errors);
|
|
71
|
+
return errors;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Asserts that an OpenApiDocument is valid, throwing InvalidOpenApiDocumentError if not.
|
|
75
|
+
*/
|
|
76
|
+
static assertValid(doc) {
|
|
77
|
+
const errors = this.validate(doc);
|
|
78
|
+
if (errors.length > 0) {
|
|
79
|
+
throw new InvalidOpenApiDocumentError(errors);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
static validateRefs(obj, availableSchemas, errors) {
|
|
83
|
+
if (!obj || typeof obj !== 'object')
|
|
84
|
+
return;
|
|
85
|
+
if (Array.isArray(obj)) {
|
|
86
|
+
for (const item of obj) {
|
|
87
|
+
this.validateRefs(item, availableSchemas, errors);
|
|
88
|
+
}
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const record = obj;
|
|
92
|
+
if (typeof record['$ref'] === 'string') {
|
|
93
|
+
const ref = record['$ref'];
|
|
94
|
+
const prefix = '#/components/schemas/';
|
|
95
|
+
if (ref.startsWith(prefix)) {
|
|
96
|
+
const schemaName = ref.slice(prefix.length);
|
|
97
|
+
if (!availableSchemas.has(schemaName)) {
|
|
98
|
+
errors.push(`Unresolved component schema reference: "${ref}".`);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
for (const value of Object.values(record)) {
|
|
103
|
+
this.validateRefs(value, availableSchemas, errors);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/public/validator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,OAAO,gBAAgB;IAC3B;;;OAGG;IACI,MAAM,CAAC,QAAQ,CAAC,GAAoB;QACzC,MAAM,MAAM,GAAa,EAAE,CAAC;QAE5B,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;QACtE,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YACd,MAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;QAC3D,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK;gBAAE,MAAM,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;YACnE,IAAI,CAAC,GA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,CAAC;QAED,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1C,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;CACF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jsango/openapi",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Deterministic OpenAPI 3.x document generation and documentation foundation for jsango",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@jsango/core": "1.0.0",
|
|
16
|
+
"@jsango/http": "1.0.0",
|
|
17
|
+
"@jsango/router": "1.0.0",
|
|
18
|
+
"@jsango/validation": "1.0.0"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/flutterbuddy1/jsango.git",
|
|
27
|
+
"directory": "packages/openapi"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsc -b",
|
|
34
|
+
"typecheck": "tsc -b",
|
|
35
|
+
"clean": "rm -rf dist *.tsbuildinfo"
|
|
36
|
+
}
|
|
37
|
+
}
|