Skip to content

[BUG][typescript-angular] Generated Readme.MD for API client suggests using deprecated openapi config parameter #20884

Open
@EMcGSantane

Description

@EMcGSantane

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • [n/a] Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
Description

Wasn't sure whether to submit this as a bug or an enhancement request. Went with bug, but if I'm incorrect about that, by all means switch the type.

An exceptionally minor issue, but when using openapi-generator-cli to generate a typescript-angular client, the bundled README.md suggests the use of accessToken in the client configuration. Going by the inline comments in the configuration.json, this has been deprecated in favour of credentials as of openapi-generator 5.0. Updating the readme to show proper use of credentials instead would be useful.

openapi-generator version

7.12.0 (via @openapitools/openapi-generator-cli:2.17.0)

OpenAPI declaration file content or url

Not relevant.

Generation Details

API client generated by calling openapi-generator-cli generate -i [apiSpecUrl] -g typescript-angular -o [outputPath] -c [configPath] Client generates successfully, and functions as expected, so the specifics are likely irrelevant unless it's dynamically updating the readme based on generate config parameters?

Steps to reproduce

Generate a typescript-angular client. Look at the generated README.md file.

Related issues/PRs

There don't appear to be any PRs tagged with typescript-angular or containing 'readme' which talk about this specifically.

Suggest a fix

Updating the documentation generated with the angular-typescript generator to not suggest the use of deprecated openapi-generate features, and instead demonstrating how to use the new credentials config property. No doubt I'll have worked it out before a PR's submitted for this, but it might save a future developer some time.

(A more general typescript-angular documentation update to account for Angular's recommendation that @NgModule shouldn't be used any more, and how to get the client working with a standalone-component based angular app would also be nice, but that's beyond the scope of this issue. Maybe worth opening a separate issue for, but this seemed like the lower hanging fruit.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions