Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function generateTags(tags: TypeSpecTagMetadata[]): string {
const tagMetadata =
description || externalDocs
? `, #{${[description, externalDocs].filter((x) => !!x).join(", ")}}`
: "";
: ", #{}";
return `@tagMetadata("${tag.name}"${tagMetadata})`;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using OpenAPI;

@service(#{ title: "Widget Service" })
@info(#{ version: "0.0.0" })
@tagMetadata("Widgets")
@tagMetadata("Widgets", #{})
namespace WidgetService;

model Error {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import "@typespec/http";
import "@typespec/openapi";
import "@typespec/openapi3";

using Http;
using OpenAPI;

@service(#{ title: "(title)" })
@info(#{ version: "0.0.0" })
@tagMetadata("consents", #{})
namespace title;

model Consent {
id: string;
}

@tag("consents")
@route("/")
@get
op getConsent(): Consent;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
openapi: 3.0.0
info:
title: (title)
version: 0.0.0
tags:
- name: consents
paths:
/:
get:
operationId: getConsent
parameters: []
responses:
"200":
description: The request has succeeded.
content:
application/json:
schema:
$ref: "#/components/schemas/Consent"
tags:
- consents
components:
schemas:
Consent:
type: object
required:
- id
properties:
id:
type: string