Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: @tag decorator not support tag object #3923

Closed
skywing918 opened this issue Jul 22, 2024 · 1 comment
Closed

[Bug]: @tag decorator not support tag object #3923

skywing918 opened this issue Jul 22, 2024 · 1 comment
Labels
bug Something isn't working needs-area

Comments

@skywing918
Copy link
Member

skywing918 commented Jul 22, 2024

Describe the bug

{The problematic object} failed to {describe the problem}.

TSP

import "@typespec/openapi3";

using TypeSpec.OpenAPI;
@tag("Tags")
@tag("Tagging")
@service
namespace PetStore;
op readxxx(): string;

Actual Specification

tags:
  - name: Tags
  - name: Tagging

Expected Specification

https://spec.openapis.org/oas/v3.0.0#tag-object
The Tag object have the following fixed files

name | REQUIRED. The name of the tag.
description | A short description for the tag. CommonMark syntax MAY be used for rich text representation.
externalDocs | Additional external documentation for this tag.

tags:
 - name: Tags
   description: Tags infos
 - name:Tagging
``` description: Tagging infos


### Reproduction

1. `git clone [https://github.com/skywing918/typespec-workaround.git`](https://github.com/skywing918/typespec-workaround.git%60)
2. `tsp compile tags.tsp`
3. Open `/tsp-output/@typespec/openapi3` to get the result

### Checklist

- [X] Follow our [Code of Conduct](https://github.com/microsoft/typespec/blob/main/CODE_OF_CONDUCT.md)
- [X] Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/Microsoft/typespec/discussions).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
@timotheeguerin
Copy link
Member

Duo of #2220

@timotheeguerin timotheeguerin closed this as not planned Won't fix, can't repro, duplicate, stale Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-area
Projects
None yet
Development

No branches or pull requests

2 participants