Azure / Azure/typespec-azure

Generate a tsp-location file as part of the openapi generation step

Open
#193 2 comments 0 reactions 0 assignees View on GitHub
design:needed
Dominant language
TypeScript
Stars
27
Forks
90
Avg merge
1d 22h
Merged PRs (30d)
156

Description

There is a need for various tools and validation steps to map back from a generated openapi document to the typespec that generated it. I would like to propose we generate a metadata file similar to what the sdk languages do with a tsp-location file (i.e. https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/openai/Azure.AI.OpenAI/tsp-location.yaml) that will contain a relative path to the TypeSpec that generated it.

This will enable us to give better errors from our validation tooling as well as to allow us to correlate an openapi APIView with its TypeSpec APIView.

I would suggest we do this for both the typespec-autorest and typespec-openapi3 emitters.

Contributor guide

Open the contributing guide

Research direction

Start by locating the generation steps for the typespec-autorest and typespec-openapi3 emitters, then compare the proposed metadata with the linked SDK tsp-location.yaml example. Done means both emitters produce a tsp-location file containing a relative path to the TypeSpec source that generated the OpenAPI document.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.