Skip to content

Update release TypeScript models script #957

Closed as not planned
Closed as not planned
@schultzp2020

Description

@schultzp2020

Which area/kind this issue is related to?
/area api
/area registry

Issue Description

Currently the workflow release-typescript-models releases TypeScript models only for the latest version of the devfile spec. As a consumer of devfiles, it would be nice to have TypeScript model support for all releases of the devfile spec, as well as TypeScript model support for the REST API responses.

Possible solutions

  1. Generate an OpenAPI JSON (soon to be a complete superset of JSON schema - 90% there and in our case it shouldn't matter) either by converting the preexisting JSON schema or use swaggest/rest. Then convert to TypeScript models by openapi-typescript.
  2. Use typescriptify-golang-structs on Go source code to generate TypeScript models.

Method 1 is preferred because it can be extended to easily test the API responses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiEnhancement or issue related to the api/devfile specificationarea/registryDevfile registry for stacks and infrastructurelifecycle/rottenRotten items. These items have been stale for 60 days and are now closed.lifecycle/staleStale items. These items have not been updated for 90 days.

    Type

    No type

    Projects

    Status

    Done ✅

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions