
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@typespec/openapi
Advanced tools
TypeSpec library providing OpenAPI concepts
npm install @typespec/openapi
@defaultResponseSpecify that this model is to be treated as the OpenAPI default response.
This differs from the compiler built-in @error decorator as this does not necessarily represent an error.
@TypeSpec.OpenAPI.defaultResponse
Model
None
@defaultResponse
model PetStoreResponse is object;
op listPets(): Pet[] | PetStoreResponse;
@extensionAttach some custom data to the OpenAPI element generated from this type.
@TypeSpec.OpenAPI.extension(key: valueof string, value: unknown)
(intrinsic) unknown
| Name | Type | Description |
|---|---|---|
| key | valueof scalar string | Extension key. Must start with x- |
| value | (intrinsic) unknown | Extension value. |
@extension("x-custom", "My value")
@extension(
"x-pageable",
{
nextLink: "x-next-link",
}
)
op read(): string;
@externalDocsSpecify the OpenAPI externalDocs property for this type.
@TypeSpec.OpenAPI.externalDocs(url: valueof string, description?: valueof string)
(intrinsic) unknown
| Name | Type | Description |
|---|---|---|
| url | valueof scalar string | Url to the docs |
| description | valueof scalar string | Description of the docs |
@externalDocs(
"https://example.com/detailed.md",
"Detailed information on how to use this operation"
)
op listPets(): Pet[];
@infoSpecify OpenAPI additional information.
The service title and version are already specified using @service.
@TypeSpec.OpenAPI.info(additionalInfo: TypeSpec.OpenAPI.AdditionalInfo)
Namespace
| Name | Type | Description |
|---|---|---|
| additionalInfo | model TypeSpec.OpenAPI.AdditionalInfo | Additional information |
@operationIdSpecify the OpenAPI operationId property for this operation.
@TypeSpec.OpenAPI.operationId(operationId: valueof string)
Operation
| Name | Type | Description |
|---|---|---|
| operationId | valueof scalar string | Operation id value. |
@operationId("download")
op read(): string;
FAQs
TypeSpec library providing OpenAPI concepts
The npm package @typespec/openapi receives a total of 93,105 weekly downloads. As such, @typespec/openapi popularity was classified as popular.
We found that @typespec/openapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.