mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-18 23:49:02 +00:00
Update TypeScript Petstore samples with OAS3 (#253)
* add scripts for ts oas3 petstore * remove json files * update ts jquery with oas3 petstore * update ts inversify, fix file mapping * update ts fetch wtih oas3 (no diff), fix script
This commit is contained in:
@@ -87,12 +87,10 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
||||
typeMapping.put("Map", "any");
|
||||
typeMapping.put("date", "string");
|
||||
typeMapping.put("DateTime", "Date");
|
||||
//TODO binary should be mapped to byte array
|
||||
// mapped to String as a workaround
|
||||
typeMapping.put("binary", "string");
|
||||
typeMapping.put("binary", "any");
|
||||
typeMapping.put("File", "any");
|
||||
typeMapping.put("ByteArray", "string");
|
||||
typeMapping.put("UUID", "string");
|
||||
typeMapping.put("File", "any");
|
||||
typeMapping.put("Error", "Error");
|
||||
|
||||
cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue("camelCase"));
|
||||
|
||||
@@ -154,7 +154,7 @@ public class TypeScriptInversifyClientCodegen extends AbstractTypeScriptClientCo
|
||||
|
||||
@Override
|
||||
public String getTypeDeclaration(Schema p) {
|
||||
if (p instanceof FileSchema) {
|
||||
if (p instanceof FileSchema || p instanceof BinarySchema) {
|
||||
return "Blob";
|
||||
} else {
|
||||
return super.getTypeDeclaration(p);
|
||||
|
||||
Reference in New Issue
Block a user