Clear and concise description of the problem
In #4453 we've implemented importing deprecated for models and properties.
However, we forgot the operations themselves, importing
openapi: 3.0.0
info:
title: Widget Service
version: 0.0.0
tags:
- name: Widgets
paths:
/widgets:
get:
operationId: Widgets_list
description: List widgets
parameters: []
responses:
'200':
description: The request has succeeded.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Widget'
default:
description: An unexpected error response.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Widgets
deprecated: true
components:
schemas:
Error:
type: object
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string
Widget:
type: object
required:
- id
- weight
- color
properties:
id:
type: string
readOnly: true
weight:
type: integer
format: int32
color:
type: string
enum:
- red
- blue
Is going to result in
import "@typespec/http";
using Http;
@service(#{ title: "Widget Service" })
namespace DemoService;
model Widget {
@visibility(Lifecycle.Read)
id: string;
weight: int32;
color: "red" | "blue";
}
@error
model Error {
code: int32;
message: string;
}
@route("/widgets")
@tag("Widgets")
interface Widgets {
/** List widgets */
@get list(): Widget[] | Error;
}
Note that the list operation is missing `#deprecated "deprecated".
Checklist
Clear and concise description of the problem
In #4453 we've implemented importing deprecated for models and properties.
However, we forgot the operations themselves, importing
Is going to result in
Note that the list operation is missing `#deprecated "deprecated".
Checklist