OpenAPITools / OpenAPITools/openapi-generator

[REQ][typescript] Use more sophisticated yaml spec for typescript generators samples

Open
#5,335 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: TypeScript Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Currently samples for all typescript generators are built based on petstore.yaml (2_0 and 3_0).
This spec doesn't include features like "date" format, allOf / oneOf, discriminators, enum aliases (for OAS3).

As a result, issues related to those features (e.g. https://github.com/OpenAPITools/openapi-generator/issues/5171) are not obvious, and also it's not obvious how fixes addressing those issues impact the end result.

A number of other generators already use a more advanced test spec for that: petstore-with-fake-endpoints-models-for-testing

Suggestion is to change all existing typescript samples from petstore to petstore-with-fake-endpoints-models-for-testing

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the TypeScript generator sample configurations that currently use petstore.yaml for OAS 2.0 and 3.0, then compare them with the petstore-with-fake-endpoints-models-for-testing spec used by other generators. Update all existing TypeScript samples to use the more comprehensive spec and verify the generated samples and related tests still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.