Class PayloadDocumentation
- Author:
- Andreas Evers, Andy Wilkinson, Marcel Overdijk
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<FieldDescriptor>applyPathPrefix(String pathPrefix, List<FieldDescriptor> descriptors) Creates a copy of the givendescriptorswith the givenpathPrefixapplied to their paths.static PayloadSubsectionExtractor<?>beneathPath(String path) Returns aPayloadSubsectionExtractorthat will extract the subsection of the JSON payload found beneath the givenpath.static FieldDescriptorfieldWithPath(String path) Creates aFieldDescriptorthat describes a field with the givenpath.static RequestFieldsSnippetrelaxedRequestFields(List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operations's request payload.static RequestFieldsSnippetrelaxedRequestFields(Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's request payload.static RequestFieldsSnippetrelaxedRequestFields(Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's request payload.static RequestFieldsSnippetrelaxedRequestFields(FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operations's request payload.static RequestFieldsSnippetrelaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the subsection of the API operations's request payload extracted by the givensubsectionExtractor.static RequestFieldsSnippetrelaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the subsection of the API operation's request payload extracted by the givensubsectionExtractor.static RequestFieldsSnippetrelaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the subsection of the API operation's request payload extracted by the givensubsectionExtractor.static RequestFieldsSnippetrelaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the subsection of the API operations's request payload extracted by the givensubsectionExtractor.static RequestPartFieldsSnippetrelaxedRequestPartFields(String part, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrelaxedRequestPartFields(String part, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrelaxedRequestPartFields(String part, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrelaxedRequestPartFields(String part, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrelaxedRequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrelaxedRequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrelaxedRequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrelaxedRequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static ResponseFieldsSnippetrelaxedResponseFields(List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetrelaxedResponseFields(Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetrelaxedResponseFields(Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetrelaxedResponseFields(FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetrelaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static ResponseFieldsSnippetrelaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static ResponseFieldsSnippetrelaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static ResponseFieldsSnippetrelaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static RequestBodySnippetReturns aSnippetthat will document the body of the API operation's request payload.static RequestBodySnippetrequestBody(Map<String, Object> attributes) Returns aSnippetthat will document the body of the API operation's request payload.static RequestBodySnippetrequestBody(PayloadSubsectionExtractor<?> subsectionExtractor) Returns aSnippetthat will document a subsection of the body of the API operation's request payload.static RequestBodySnippetrequestBody(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes) Returns aSnippetthat will document a subsection of the body of the API operation's request payload.static RequestFieldsSnippetrequestFields(List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operations's request payload.static RequestFieldsSnippetrequestFields(Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's request payload.static RequestFieldsSnippetrequestFields(Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's request payload.static RequestFieldsSnippetrequestFields(FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operations's request payload.static RequestFieldsSnippetrequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields in the subsection of the API operations's request payload extracted by the givensubsectionExtractor.static RequestFieldsSnippetrequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the subsection of the API operation's request payload extracted by the givensubsectionExtractor.static RequestFieldsSnippetrequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the subsection of the API operation's request payload extracted by the givensubsectionExtractor.static RequestFieldsSnippetrequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the subsection of API operations's request payload extracted by the givensubsectionExtractor.static RequestPartBodySnippetrequestPartBody(String partName) Returns aSnippetthat will document the body of specified part of the API operation's request payload.static RequestPartBodySnippetrequestPartBody(String partName, Map<String, Object> attributes) Returns aSnippetthat will document the body of specified part of the API operation's request payload.static RequestPartBodySnippetrequestPartBody(String partName, PayloadSubsectionExtractor<?> subsectionExtractor) Returns aSnippetthat will document a subsection of the body of specified part of the API operation's request payload.static RequestPartBodySnippetrequestPartBody(String partName, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes) Returns aSnippetthat will document a subsection of the body of specified part of the API operation's request payload.static RequestPartFieldsSnippetrequestPartFields(String part, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrequestPartFields(String part, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrequestPartFields(String part, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrequestPartFields(String part, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetrequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static ResponseBodySnippetReturns aSnippetthat will document the body of the API operation's response payload.static ResponseBodySnippetresponseBody(Map<String, Object> attributes) Returns aSnippetthat will document the body of the API operation's response payload.static ResponseBodySnippetresponseBody(PayloadSubsectionExtractor<?> subsectionExtractor) Returns aSnippetthat will document a subsection of the body of the API operation's response payload.static ResponseBodySnippetresponseBody(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes) Returns aSnippetthat will document a subsection of the body of the API operation's response payload.static ResponseFieldsSnippetresponseFields(List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetresponseFields(Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetresponseFields(Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetresponseFields(FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetresponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static ResponseFieldsSnippetresponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static ResponseFieldsSnippetresponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static ResponseFieldsSnippetresponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static SubsectionDescriptorsubsectionWithPath(String path) Creates aFieldDescriptorthat describes a subsection, i.e.
-
Method Details
-
fieldWithPath
Creates aFieldDescriptorthat describes a field with the givenpath.When documenting an XML payload, the
pathuses XPath, i.e. '/' is used to descend to a child node.When documenting a JSON payload, the
pathuses '.' to descend into a child object and '[]' to descend into an array. For example, with this JSON payload:{ "a":{ "b":[ { "c":"one" }, { "c":"two" }, { "d":"three" } ] } }The following paths are all present:Paths that are present and their values Path Value aAn object containing "b" a.bAn array containing three objects a.b[]An array containing three objects a.b[].cAn array containing the strings "one" and "two" a.b[].dThe string "three" - Parameters:
path- the path of the field- Returns:
- a
FieldDescriptorready for further configuration
-
subsectionWithPath
Creates aFieldDescriptorthat describes a subsection, i.e. a field and all of its descendants, with the givenpath.When documenting an XML payload, the
pathuses XPath, i.e. '/' is used to descend to a child node.When documenting a JSON payload, the
pathuses '.' to descend into a child object and '[]' to descend into an array. For example, with this JSON payload:{ "a":{ "b":[ { "c":"one" }, { "c":"two" }, { "d":"three" } ] } }The following paths are all present:Paths that are present and their values Path Value aAn object containing "b" a.bAn array containing three objects a.b[]An array containing three objects a.b[].cAn array containing the strings "one" and "two" a.b[].dThe string "three" A subsection descriptor for the array with the path
a.b[]will also describe its descendantsa.b[].canda.b[].d.- Parameters:
path- the path of the subsection- Returns:
- a
SubsectionDescriptorready for further configuration
-
requestFields
Returns aSnippetthat will document the fields of the API operations's request payload. The fields will be documented using the givendescriptors.If a field is present in the request payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the request, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
descriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
requestFields
Returns aSnippetthat will document the fields of the API operations's request payload. The fields will be documented using the givendescriptors.If a field is present in the request payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the request, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
descriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
relaxedRequestFields
Returns aSnippetthat will document the fields of the API operations's request payload. The fields will be documented using the givendescriptors.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
descriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
relaxedRequestFields
Returns aSnippetthat will document the fields of the API operations's request payload. The fields will be documented using the givendescriptors.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
descriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
requestFields
public static RequestFieldsSnippet requestFields(Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's request payload. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is present in the request payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the request, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
attributes- the attributesdescriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
requestFields
public static RequestFieldsSnippet requestFields(Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's request payload. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is present in the request payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the request, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
attributes- the attributesdescriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
relaxedRequestFields
public static RequestFieldsSnippet relaxedRequestFields(Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's request payload. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
attributes- the attributesdescriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
relaxedRequestFields
public static RequestFieldsSnippet relaxedRequestFields(Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's request payload. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
attributes- the attributesdescriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
requestFields
public static RequestFieldsSnippet requestFields(PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the subsection of API operations's request payload extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptors.If a field is present in the subsection of the request payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the subsection, a failure will also occur.For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
subsectionExtractor- the subsection extractordescriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
requestFields
public static RequestFieldsSnippet requestFields(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields in the subsection of the API operations's request payload extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptors.If a field is present in the subsection of the request payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the subsection, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
subsectionExtractor- the subsection extractordescriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedRequestFields
public static RequestFieldsSnippet relaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the subsection of the API operations's request payload extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptors.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
subsectionExtractor- the subsection extractordescriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedRequestFields
public static RequestFieldsSnippet relaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the subsection of the API operations's request payload extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptors.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
subsectionExtractor- the subsection extractordescriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
requestFields
public static RequestFieldsSnippet requestFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the subsection of the API operation's request payload extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is present in the subsection of the request payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the subsection, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
subsectionExtractor- the subsection extractorattributes- the attributesdescriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
requestFields
public static RequestFieldsSnippet requestFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the subsection of the API operation's request payload extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is present in the subsection of the request payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the subsection, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
subsectionExtractor- the subsection extractorattributes- the attributesdescriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedRequestFields
public static RequestFieldsSnippet relaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the subsection of the API operation's request payload extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
subsectionExtractor- the subsection extractorattributes- the attributesdescriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedRequestFields
public static RequestFieldsSnippet relaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the subsection of the API operation's request payload extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
subsectionExtractor- the subsection extractorattributes- the attributesdescriptors- the descriptions of the request payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
requestPartFields
public static RequestPartFieldsSnippet requestPartFields(String part, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload. The fields will be documented using the givendescriptors.If a field is present in the payload of the request part, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the request part's payload, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
part- the part namedescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
requestPartFields
public static RequestPartFieldsSnippet requestPartFields(String part, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload. The fields will be documented using the givendescriptors.If a field is present in the payload of the request part, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the request part's payload, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
part- the part namedescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- See Also:
-
relaxedRequestPartFields
public static RequestPartFieldsSnippet relaxedRequestPartFields(String part, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload. The fields will be documented using the givendescriptors.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
part- the part namedescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- See Also:
-
relaxedRequestPartFields
public static RequestPartFieldsSnippet relaxedRequestPartFields(String part, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload. The fields will be documented using the givendescriptors.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
part- the part namedescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- See Also:
-
requestPartFields
public static RequestPartFieldsSnippet requestPartFields(String part, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is present in the payload of the request part, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the request part's payload, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
part- the part nameattributes- the attributesdescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- See Also:
-
requestPartFields
public static RequestPartFieldsSnippet requestPartFields(String part, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is present in the payload of the request part, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the request part's payload, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
part- the part nameattributes- the attributesdescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- See Also:
-
relaxedRequestPartFields
public static RequestPartFieldsSnippet relaxedRequestPartFields(String part, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
part- the part nameattributes- the attributesdescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- See Also:
-
relaxedRequestPartFields
public static RequestPartFieldsSnippet relaxedRequestPartFields(String part, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
part- the part nameattributes- the attributesdescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- See Also:
-
requestPartFields
public static RequestPartFieldsSnippet requestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload. The subsection will be extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptors.If a field is present in the subsection of the request part payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the subsection, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
part- the part namesubsectionExtractor- the subsection extractordescriptors- the descriptions of the subsection's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
requestPartFields
public static RequestPartFieldsSnippet requestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload. The subsection will be extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptors.If a field is present in the subsection of the request part payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the subsection, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
part- the part namesubsectionExtractor- the subsection extractordescriptors- the descriptions of the subsection's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedRequestPartFields
public static RequestPartFieldsSnippet relaxedRequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload. The subsection will be extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptors.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
part- the part namesubsectionExtractor- the subsection extractordescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedRequestPartFields
public static RequestPartFieldsSnippet relaxedRequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload. The subsection will be extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptors.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
part- the part namesubsectionExtractor- the subsection extractordescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
requestPartFields
public static RequestPartFieldsSnippet requestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload. The subsection will be extracted by the givnesubsectionExtractor. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is present in the subsection of the request part payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the subsection, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
part- the part namesubsectionExtractor- the subsection extractorattributes- the attributesdescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
requestPartFields
public static RequestPartFieldsSnippet requestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload. The subsection will be extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is present in the subsection of the request part payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the subsection, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
part- the part namesubsectionExtractor- the subsection extractorattributes- the attributesdescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedRequestPartFields
public static RequestPartFieldsSnippet relaxedRequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload. The subsection will be extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
part- the part namesubsectionExtractor- the subsection extractorattributes- the attributesdescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedRequestPartFields
public static RequestPartFieldsSnippet relaxedRequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload. The subsection will be extracted by the givensubsectionExtractor. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
part- the part namesubsectionExtractor- the subsection extractorattributes- the attributesdescriptors- the descriptions of the request part's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
responseFields
Returns aSnippetthat will document the fields of the API operation's response payload. The fields will be documented using the givendescriptors.If a field is present in the response payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the response, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
descriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
responseFields
Returns aSnippetthat will document the fields of the API operation's response payload. The fields will be documented using the givendescriptors.If a field is present in the response payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the response, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
descriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedResponseFields
Returns aSnippetthat will document the fields of the API operation's response payload. The fields will be documented using the givendescriptors.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
descriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedResponseFields
Returns aSnippetthat will document the fields of the API operation's response payload. The fields will be documented using the givendescriptors.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
descriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
responseFields
public static ResponseFieldsSnippet responseFields(Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's response payload. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is present in the response payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the response, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
attributes- the attributesdescriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
responseFields
public static ResponseFieldsSnippet responseFields(Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's response payload. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is present in the response payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the response, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
attributes- the attributesdescriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
relaxedResponseFields
public static ResponseFieldsSnippet relaxedResponseFields(Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's response payload. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
attributes- the attributesdescriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
relaxedResponseFields
public static ResponseFieldsSnippet relaxedResponseFields(Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's response payload. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
attributes- the attributesdescriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- See Also:
-
responseFields
public static ResponseFieldsSnippet responseFields(PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload. The subsection will be extracted using the givensubsectionExtractor. The fields will be documented using the givendescriptors.If a field is present in the response payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the response payload, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
subsectionExtractor- the subsection extractordescriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
responseFields
public static ResponseFieldsSnippet responseFields(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload. The subsection will be extracted using the givensubsectionExtractor. The fields will be documented using the givendescriptors.If a field is present in the response payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the response payload, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
subsectionExtractor- the subsection extractordescriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedResponseFields
public static ResponseFieldsSnippet relaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload. The subsection will be extracted using the givensubsectionExtractor. The fields will be documented using the givendescriptors.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
subsectionExtractor- the subsection extractordescriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedResponseFields
public static ResponseFieldsSnippet relaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload. The subsection will be extracted using the givensubsectionExtractor. The fields will be documented using the givendescriptors.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
subsectionExtractor- the subsection extractordescriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
responseFields
public static ResponseFieldsSnippet responseFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload. The subsection will be extracted using the givensubsectionExtractor. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is present in the response payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the response payload, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
subsectionExtractor- the subsection extractorattributes- the attributesdescriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
responseFields
public static ResponseFieldsSnippet responseFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload. The subsection will be extracted using the givensubsectionExtractor. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is present in the response payload, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a field is documented, is not marked as optional, and is not present in the response payload, a failure will also occur. For payloads with a hierarchical structure, documenting a field with a
subsection descriptorwill mean that all of its descendants are also treated as having been documented.If you do not want to document a field or subsection, a descriptor can be
configured to ignore it. The ignored field or subsection will not appear in the generated snippet and the failure described above will not occur.- Parameters:
subsectionExtractor- the subsection extractorattributes- the attributesdescriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedResponseFields
public static ResponseFieldsSnippet relaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload. The subsection will be extracted using the givensubsectionExtractor. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
subsectionExtractor- the subsection extractorattributes- the attributesdescriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
relaxedResponseFields
public static ResponseFieldsSnippet relaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload. The subsection will be extracted using the givensubsectionExtractor. The fields will be documented using the givendescriptorsand the givenattributeswill be available during snippet generation.If a field is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented fields will be ignored.
- Parameters:
subsectionExtractor- the subsection extractorattributes- the attributesdescriptors- the descriptions of the response payload's fields- Returns:
- the snippet that will document the fields
- Since:
- 1.2.0
- See Also:
-
requestBody
Returns aSnippetthat will document the body of the API operation's request payload.- Returns:
- the snippet that will document the request body
-
requestBody
Returns aSnippetthat will document the body of the API operation's request payload. The given attributes will be made available during snippet generation.- Parameters:
attributes- the attributes- Returns:
- the snippet that will document the request body
-
requestBody
Returns aSnippetthat will document a subsection of the body of the API operation's request payload. The subsection will be extracted using the givensubsectionExtractor.- Parameters:
subsectionExtractor- the subsection extractor- Returns:
- the snippet that will document the request body subsection
-
requestBody
public static RequestBodySnippet requestBody(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes) Returns aSnippetthat will document a subsection of the body of the API operation's request payload. The subsection will be extracted using the givensubsectionExtractor. The given attributes will be made available during snippet generation.- Parameters:
subsectionExtractor- the subsection extractorattributes- the attributes- Returns:
- the snippet that will document the request body subsection
-
responseBody
Returns aSnippetthat will document the body of the API operation's response payload.- Returns:
- the snippet that will document the response body
-
responseBody
Returns aSnippetthat will document the body of the API operation's response payload. The given attributes will be made available during snippet generation.- Parameters:
attributes- the attributes- Returns:
- the snippet that will document the response body
-
responseBody
Returns aSnippetthat will document a subsection of the body of the API operation's response payload. The subsection will be extracted using the givensubsectionExtractor.- Parameters:
subsectionExtractor- the subsection extractor- Returns:
- the snippet that will document the response body subsection
-
responseBody
public static ResponseBodySnippet responseBody(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes) Returns aSnippetthat will document a subsection of the body of the API operation's response payload. The subsection will be extracted using the givensubsectionExtractor. The given attributes will be made available during snippet generation.- Parameters:
subsectionExtractor- the subsection extractorattributes- the attributes- Returns:
- the snippet that will document the response body subsection
-
requestPartBody
Returns aSnippetthat will document the body of specified part of the API operation's request payload.- Parameters:
partName- the name of the request part- Returns:
- the snippet that will document the response body
-
requestPartBody
public static RequestPartBodySnippet requestPartBody(String partName, Map<String, Object> attributes) Returns aSnippetthat will document the body of specified part of the API operation's request payload. The given attributes will be made available during snippet generation.- Parameters:
partName- the name of the request partattributes- the attributes- Returns:
- the snippet that will document the response body
-
requestPartBody
public static RequestPartBodySnippet requestPartBody(String partName, PayloadSubsectionExtractor<?> subsectionExtractor) Returns aSnippetthat will document a subsection of the body of specified part of the API operation's request payload. The subsection will be extracted using the givensubsectionExtractor.- Parameters:
partName- the name of the request partsubsectionExtractor- the subsection extractor- Returns:
- the snippet that will document the response body
-
requestPartBody
public static RequestPartBodySnippet requestPartBody(String partName, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes) Returns aSnippetthat will document a subsection of the body of specified part of the API operation's request payload. The subsection will be extracted using the givensubsectionExtractor. The given attributes will be made available during snippet generation.- Parameters:
partName- the name of the request partsubsectionExtractor- the subsection extractorattributes- the attributes- Returns:
- the snippet that will document the response body
-
applyPathPrefix
public static List<FieldDescriptor> applyPathPrefix(String pathPrefix, List<FieldDescriptor> descriptors) Creates a copy of the givendescriptorswith the givenpathPrefixapplied to their paths.- Parameters:
pathPrefix- the path prefixdescriptors- the descriptors to copy- Returns:
- the copied descriptors with the prefix applied
-
beneathPath
Returns aPayloadSubsectionExtractorthat will extract the subsection of the JSON payload found beneath the givenpath.- Parameters:
path- the path- Returns:
- the subsection extractor
- Since:
- 1.2.0
-