@typespec/openapi3
Advanced tools
Comparing version 0.49.0-dev.16 to 0.49.0-dev.17
@@ -151,2 +151,8 @@ import { JSONSchemaType } from "@typespec/compiler"; | ||
}; | ||
readonly "unsupported-status-code-range": { | ||
readonly severity: "error"; | ||
readonly messages: { | ||
readonly default: import("@typespec/compiler").CallableMessage<["start", "end"]>; | ||
}; | ||
}; | ||
}; | ||
@@ -206,4 +212,7 @@ readonly emitter: { | ||
}; | ||
"unsupported-status-code-range": { | ||
readonly default: import("@typespec/compiler").CallableMessage<["start", "end"]>; | ||
}; | ||
}, OpenAPI3EmitterOptions>; | ||
export declare const reportDiagnostic: <C extends "oneof-union" | "inconsistent-shared-route-request-visibility" | "invalid-server-variable" | "invalid-format" | "resource-namespace" | "path-query" | "duplicate-body" | "duplicate-header" | "status-code-in-default-response" | "invalid-schema" | "union-null" | "empty-union" | "empty-enum" | "enum-unique-type" | "invalid-default" | "inline-cycle", M extends keyof { | ||
export declare const reportDiagnostic: <C extends "oneof-union" | "inconsistent-shared-route-request-visibility" | "invalid-server-variable" | "invalid-format" | "resource-namespace" | "path-query" | "duplicate-body" | "duplicate-header" | "status-code-in-default-response" | "invalid-schema" | "union-null" | "empty-union" | "empty-enum" | "enum-unique-type" | "invalid-default" | "inline-cycle" | "unsupported-status-code-range", M extends keyof { | ||
"oneof-union": { | ||
@@ -257,2 +266,5 @@ readonly default: "@oneOf decorator can only be used on a union or a model property which type is a union."; | ||
}; | ||
"unsupported-status-code-range": { | ||
readonly default: import("@typespec/compiler").CallableMessage<["start", "end"]>; | ||
}; | ||
}[C]>(program: import("@typespec/compiler").Program, diag: import("@typespec/compiler").DiagnosticReport<{ | ||
@@ -307,4 +319,7 @@ "oneof-union": { | ||
}; | ||
"unsupported-status-code-range": { | ||
readonly default: import("@typespec/compiler").CallableMessage<["start", "end"]>; | ||
}; | ||
}, C, M>) => void, createStateSymbol: (name: string) => symbol; | ||
export type OpenAPILibrary = typeof $lib; | ||
//# sourceMappingURL=lib.d.ts.map |
@@ -162,2 +162,8 @@ import { createTypeSpecLibrary, paramMessage } from "@typespec/compiler"; | ||
}, | ||
"unsupported-status-code-range": { | ||
severity: "error", | ||
messages: { | ||
default: paramMessage `Status code range '${"start"} to '${"end"}' is not supported. OpenAPI 3.0 can only represent range 1XX, 2XX, 3XX, 4XX and 5XX. Example: \`@minValue(400) @maxValue(499)\` for 4XX.`, | ||
}, | ||
}, | ||
}, | ||
@@ -164,0 +170,0 @@ emitter: { |
@@ -78,4 +78,5 @@ import { ExtensionKey } from "@typespec/openapi"; | ||
} | ||
export type OpenAPI2Responses = { | ||
[status: string]: Refable<OpenAPI3Response>; | ||
export type OpenAPI3StatusCode = string | "default" | "1XX" | "2XX" | "3XX" | "4XX" | "5XX"; | ||
export type OpenAPI3Responses = { | ||
[status: OpenAPI3StatusCode]: Refable<OpenAPI3Response>; | ||
} & Extensions; | ||
@@ -82,0 +83,0 @@ export type OpenAPI3Response = Extensions & { |
{ | ||
"name": "@typespec/openapi3", | ||
"version": "0.49.0-dev.16", | ||
"version": "0.49.0-dev.17", | ||
"author": "Microsoft Corporation", | ||
@@ -5,0 +5,0 @@ "description": "TypeSpec library for emitting OpenAPI 3.0 from the TypeSpec REST protocol binding", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
196322
2748