Skip to content

Commit

Permalink
Fix JS test using baseName in default value (#5)
Browse files Browse the repository at this point in the history
* fix js test using baseName in default value

* re-enable JS test
  • Loading branch information
wing328 committed May 13, 2018
1 parent e33f9e5 commit d80e295
Show file tree
Hide file tree
Showing 46 changed files with 19 additions and 2,005 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ public String toDefaultValue(Schema p) {
public String toDefaultValueWithParam(String name, Schema p) {
String type = normalizeType(getTypeDeclaration(p));
if (!StringUtils.isEmpty(p.get$ref())) {
return " = " + type + ".constructFromObject(data['" + getSchemaType(p) + "']);";
return " = " + type + ".constructFromObject(data['" + name + "']);";
} else {
return " = ApiClient.convertToType(data['" + name + "'], " + type + ");";
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@
<module>samples/openapi3/client/petstore/php/OpenAPIClient-php</module>
<module>samples/client/petstore/scala</module>
<module>samples/client/petstore/akka-scala</module>
<!--<module>samples/client/petstore/javascript</module>-->
<module>samples/client/petstore/javascript</module>
<module>samples/client/petstore/python</module>
<module>samples/client/petstore/python-tornado</module>
<module>samples/client/petstore/python-asyncio</module>
Expand Down

This file was deleted.

9 changes: 0 additions & 9 deletions samples/client/petstore/javascript/docs/Animal.md

This file was deleted.

7 changes: 0 additions & 7 deletions samples/client/petstore/javascript/docs/AnimalFarm.md

This file was deleted.

52 changes: 0 additions & 52 deletions samples/client/petstore/javascript/docs/AnotherFakeApi.md

This file was deleted.

10 changes: 0 additions & 10 deletions samples/client/petstore/javascript/docs/ApiResponse.md

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions samples/client/petstore/javascript/docs/ArrayOfNumberOnly.md

This file was deleted.

10 changes: 0 additions & 10 deletions samples/client/petstore/javascript/docs/ArrayTest.md

This file was deleted.

13 changes: 0 additions & 13 deletions samples/client/petstore/javascript/docs/Capitalization.md

This file was deleted.

8 changes: 0 additions & 8 deletions samples/client/petstore/javascript/docs/Cat.md

This file was deleted.

9 changes: 0 additions & 9 deletions samples/client/petstore/javascript/docs/Category.md

This file was deleted.

8 changes: 0 additions & 8 deletions samples/client/petstore/javascript/docs/ClassModel.md

This file was deleted.

8 changes: 0 additions & 8 deletions samples/client/petstore/javascript/docs/Client.md

This file was deleted.

8 changes: 0 additions & 8 deletions samples/client/petstore/javascript/docs/Dog.md

This file was deleted.

31 changes: 0 additions & 31 deletions samples/client/petstore/javascript/docs/EnumArrays.md

This file was deleted.

12 changes: 0 additions & 12 deletions samples/client/petstore/javascript/docs/EnumClass.md

This file was deleted.

60 changes: 0 additions & 60 deletions samples/client/petstore/javascript/docs/EnumTest.md

This file was deleted.

Loading

0 comments on commit d80e295

Please sign in to comment.