-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[Typescript] add missing type mapping #973
[Typescript] add missing type mapping #973
Conversation
tested with the following definition swagger: '2.0'
info:
description: Test
version: 1.0.0
title: Test
host: localhost:8080
basePath: /v1
schemes:
- http
# Path API Definitions
paths:
/administration/stammdaten:
post:
consumes:
- application/json
parameters:
- in: body
name: body
schema:
type: object
additionalProperties:
type: object
properties:
code:
type: integer
text:
type: string
produces:
- application/json
responses:
200:
description: 'Successful operation'
# Data models
definitions:
Stammdaten:
type: object
properties:
modelMap:
type: object
additionalProperties:
type: object
properties:
code:
type: integer
text:
type: string and configuration
to produce import { StammdatenModelMapMySuffix } from './stammdatenModelMap';
export interface StammdatenMySuffix {
modelMap?: { [key: string]: StammdatenModelMapMySuffix; };
} and export interface StammdatenModelMapMySuffix {
code?: number;
text?: string;
} and import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent } from '@angular/common/http';
import { CustomHttpUrlEncodingCodec } from '../encoder';
import { Observable } from 'rxjs';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
@Injectable({
providedIn: 'root'
})
export class DefaultMySuffix {
...
} |
@wing328 could you please review and merge this? it is a tiny change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@macjohnny thanks again for the PR, which is included in the v3.3.0 minor release: https://twitter.com/oas_generator/status/1046941449609068544 |
* OpenAPITools#957: add missing type mapping * OpenAPITools#957: generate samples
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,3.3.x
,4.0.x
. Default:master
.Description of the PR
Adds a missing type mapping
fixes #957
cc @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09)