mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
[JAVA][Rest-assured] reqSpec() method has been added into api.mustache for requests custom… (#7556)
* reqSpec() method has been added into api.mustache for requests customisation (group operations) * add - reqSpec() has been added to samples
This commit is contained in:
parent
ee561fcd63
commit
62a930223f
@ -73,6 +73,14 @@ public class {{classname}} {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Customise request specification
|
||||
*/
|
||||
public {{classname}} reqSpec(Consumer<RequestSpecBuilder> consumer) {
|
||||
consumer.accept(reqSpec);
|
||||
return this;
|
||||
}
|
||||
|
||||
{{#operations}}
|
||||
{{#operation}}
|
||||
/**
|
||||
|
@ -74,6 +74,14 @@ public class AnotherFakeApi {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Customise request specification
|
||||
*/
|
||||
public AnotherFakeApi reqSpec(Consumer<RequestSpecBuilder> consumer) {
|
||||
consumer.accept(reqSpec);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
|
@ -110,6 +110,14 @@ public class FakeApi {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Customise request specification
|
||||
*/
|
||||
public FakeApi reqSpec(Consumer<RequestSpecBuilder> consumer) {
|
||||
consumer.accept(reqSpec);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
|
@ -74,6 +74,14 @@ public class FakeClassnameTags123Api {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Customise request specification
|
||||
*/
|
||||
public FakeClassnameTags123Api reqSpec(Consumer<RequestSpecBuilder> consumer) {
|
||||
consumer.accept(reqSpec);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
*
|
||||
|
@ -105,6 +105,14 @@ public class PetApi {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Customise request specification
|
||||
*/
|
||||
public PetApi reqSpec(Consumer<RequestSpecBuilder> consumer) {
|
||||
consumer.accept(reqSpec);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
|
@ -86,6 +86,14 @@ public class StoreApi {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Customise request specification
|
||||
*/
|
||||
public StoreApi reqSpec(Consumer<RequestSpecBuilder> consumer) {
|
||||
consumer.accept(reqSpec);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
@ -102,6 +102,14 @@ public class UserApi {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Customise request specification
|
||||
*/
|
||||
public UserApi reqSpec(Consumer<RequestSpecBuilder> consumer) {
|
||||
consumer.accept(reqSpec);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
|
Loading…
Reference in New Issue
Block a user