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

Create DTO generator for TypeScript #12132

Closed
evidolob opened this issue Dec 6, 2018 · 0 comments
Closed

Create DTO generator for TypeScript #12132

evidolob opened this issue Dec 6, 2018 · 0 comments
Assignees
Labels
kind/enhancement A feature request - must adhere to the feature request template.

Comments

@evidolob
Copy link
Contributor

evidolob commented Dec 6, 2018

Description

During work on #11306 we discovered that we need to have some Che DTO object description. Currently we have some TypeScript file generated by https://github.com/eclipse/che/blob/master/dockerfiles/lib/build.sh#L35 , but it's not wryly fit our needs. For TypeScript it's mach better to have:

export interface WorkspaceDto {
    id?: string;
    config: WorkspaceConfig;
    status: string | WorkspaceStatus;
    namespace?: string;
    temporary?: boolean;
    attributes?: WorkspaceAttributes;
    runtime?: Runtime;
    links?: { [attrName: string]: string };
}

instead of:

export module org.eclipse.che.api.workspace.shared.dto {

  export interface WorkspaceDto {
      setConfig(arg0): void;
      setId(arg0): void;
      getConfig(): org.eclipse.che.api.workspace.shared.dto.WorkspaceConfigDto;
      setStatus(arg0): void;
      withAttributes(arg0): org.eclipse.che.api.workspace.shared.dto.WorkspaceDto;
      getLinks(): Map<string,string>;
      setLinks(arg0): void;
      setAttributes(arg0): void;
      withLinks(arg0): org.eclipse.che.api.workspace.shared.dto.WorkspaceDto;
      withId(arg0): org.eclipse.che.api.workspace.shared.dto.WorkspaceDto;
      withStatus(arg0): org.eclipse.che.api.workspace.shared.dto.WorkspaceDto;
      withConfig(arg0): org.eclipse.che.api.workspace.shared.dto.WorkspaceDto;
      setTemporary(arg0): void;
      withTemporary(arg0): org.eclipse.che.api.workspace.shared.dto.WorkspaceDto;
      setRuntime(arg0): void;
      withRuntime(arg0): org.eclipse.che.api.workspace.shared.dto.WorkspaceDto;
      setNamespace(arg0): void;
      withNamespace(arg0): org.eclipse.che.api.workspace.shared.dto.WorkspaceDto;
      getRuntime(): org.eclipse.che.api.workspace.shared.dto.RuntimeDto;
      getNamespace(): string;
      getStatus(): string;
      isTemporary(): boolean;
      getId(): string;
      getAttributes(): Map<string,string>;

  toJson() : any;
  } 
} 
@evidolob evidolob added kind/enhancement A feature request - must adhere to the feature request template. team/ide2 labels Dec 6, 2018
@evidolob evidolob self-assigned this Dec 6, 2018
evidolob added a commit that referenced this issue Dec 21, 2018
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
evidolob added a commit that referenced this issue Dec 21, 2018
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
evidolob added a commit that referenced this issue Dec 26, 2018
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
evidolob added a commit that referenced this issue Dec 26, 2018
#12132 Add '.d.ts' DTO generator

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

No branches or pull requests

1 participant