-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
1,591 additions
and
693 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
modules/swagger-codegen/src/main/resources/Java/libraries/rest-assured/ApiClient.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
{{>licenseInfo}} | ||
|
||
package {{invokerPackage}}; | ||
|
||
import {{apiPackage}}.*; | ||
|
27 changes: 27 additions & 0 deletions
27
.../swagger-codegen/src/main/resources/Java/libraries/rest-assured/GsonObjectMapper.mustache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{{>licenseInfo}} | ||
|
||
package {{invokerPackage}}; | ||
|
||
import io.restassured.mapper.ObjectMapper; | ||
import io.restassured.mapper.ObjectMapperDeserializationContext; | ||
import io.restassured.mapper.ObjectMapperSerializationContext; | ||
|
||
public class GsonObjectMapper implements ObjectMapper { | ||
private GsonObjectMapper() { | ||
} | ||
|
||
public static GsonObjectMapper gson() { | ||
return new GsonObjectMapper(); | ||
} | ||
|
||
@Override | ||
public Object deserialize(ObjectMapperDeserializationContext context) { | ||
return new JSON().deserialize(context.getDataToDeserialize().asString(), context.getType()); | ||
} | ||
|
||
@Override | ||
public Object serialize(ObjectMapperSerializationContext context) { | ||
return new JSON().serialize(context.getObjectToSerialize()); | ||
} | ||
} |
Oops, something went wrong.