diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/AppRegistryDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/AppRegistryDocumentation.java index 5b82e89d66..424ed36e47 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/AppRegistryDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/AppRegistryDocumentation.java @@ -78,8 +78,8 @@ void registeringAnApplicationVersion() throws Exception { .andDo( this.documentationHandler.document( pathParameters( - parameterWithName("type") - .description("The type of application to register. One of " + Arrays.asList(ApplicationType.values()) + " (optional)"), + parameterWithName("type").optional() + .description("The type of application to register. One of " + Arrays.asList(ApplicationType.values())), parameterWithName("name").description("The name of the application to register"), parameterWithName("version").description("The version of the application to register") ), @@ -101,8 +101,9 @@ void registeringAnApplicationVersion() throws Exception { void bulkRegisteringApps() throws Exception { this.mockMvc.perform( post("/apps") - .param("apps", "source.http=maven://org.springframework.cloud.stream.app:http-source-rabbit:4.0.0") - .param("force", "false")) + .queryParam("apps", "source.http=maven://org.springframework.cloud.stream.app:http-source-rabbit:4.0.0") + .queryParam("force", "false") + ) .andExpect(status().isCreated()) .andDo( this.documentationHandler.document( @@ -132,13 +133,14 @@ void getApplicationsFiltered() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( queryParameters( - parameterWithName("search").description("The search string performed on the name (optional)"), + parameterWithName("search").optional() + .description("The search string performed on the name"), parameterWithName("type") .description("Restrict the returned apps to the type of the app. One of " + Arrays.asList(ApplicationType.values())), - parameterWithName("defaultVersion").description("The boolean flag to set to retrieve only the apps of the default versions (optional)"), - parameterWithName("page").description("The zero-based page number (optional)"), - parameterWithName("sort").description("The sort on the list (optional)"), - parameterWithName("size").description("The requested page size (optional)") + parameterWithName("defaultVersion").optional().description("The boolean flag to set to retrieve only the apps of the default versions"), + parameterWithName("page").optional().description("The zero-based page number"), + parameterWithName("sort").optional().description("The sort on the list"), + parameterWithName("size").optional().description("The requested page size") ), responseFields( subsectionWithPath("_embedded.appRegistrationResourceList") @@ -192,7 +194,7 @@ void getSingleApplication() throws Exception { void registeringAnApplication() throws Exception { this.mockMvc.perform( post("/apps/{type}/{name}", ApplicationType.source, "http") - .queryParam("uri", "maven://org.springframework.cloud.stream.app:http-source-rabbit:5.0.0") + .queryParam("uri", "maven://org.springframework.cloud.stream.app:http-source-rabbit:5.0.0") ) .andExpect(status().isCreated()) .andDo( @@ -224,7 +226,7 @@ void unregisteringAnApplication() throws Exception { pathParameters( parameterWithName("type").description("The type of application to unregister. One of " + Arrays.asList(ApplicationType.values())), parameterWithName("name").description("The name of the application to unregister"), - parameterWithName("version").description("The version of the application to unregister (optional)") + parameterWithName("version").optional().description("The version of the application to unregister") ) ) ); diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/AuditRecordsDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/AuditRecordsDocumentation.java index b59fdb2bf8..3c54a3cc1e 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/AuditRecordsDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/AuditRecordsDocumentation.java @@ -74,14 +74,14 @@ void listAllAuditRecords() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page").description("The zero-based page number (optional)"), - parameterWithName("size").description("The requested page size (optional)"), - parameterWithName("operations").description("Comma-separated list of Audit Operations (optional)"), - parameterWithName("actions").description("Comma-separated list of Audit Actions (optional)"), - parameterWithName("fromDate") - .description("From date filter (ex.: 2019-02-03T00:00:30) (optional)"), - parameterWithName("toDate") - .description("To date filter (ex.: 2019-02-03T00:00:30) (optional)") + parameterWithName("page").optional().description("The zero-based page number"), + parameterWithName("size").optional().description("The requested page size"), + parameterWithName("operations").optional().description("Comma-separated list of Audit Operations"), + parameterWithName("actions").optional().description("Comma-separated list of Audit Actions"), + parameterWithName("fromDate").optional() + .description("From date filter (ex.: 2019-02-03T00:00:30)"), + parameterWithName("toDate").optional() + .description("To date filter (ex.: 2019-02-03T00:00:30)") ), responseFields( subsectionWithPath("_embedded.auditRecordResourceList") @@ -97,11 +97,11 @@ void getAuditRecord() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters( - parameterWithName("id").description("The id of the audit record to query (required)") + parameterWithName("id").description("The id of the audit record to query") ), responseFields( fieldWithPath("auditRecordId").description("The id of the audit record"), - fieldWithPath("createdBy").description("The author of the audit record (optional)"), + fieldWithPath("createdBy").optional().description("The author of the audit record"), fieldWithPath("correlationId").description("The correlation ID of the audit record"), fieldWithPath("auditData").description("The data of the audit record"), fieldWithPath("createdOn").description("The creation date of the audit record"), diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/JobExecutionsDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/JobExecutionsDocumentation.java index f3a7cb9ac2..4870d135a2 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/JobExecutionsDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/JobExecutionsDocumentation.java @@ -114,10 +114,10 @@ void listJobExecutions() throws Exception { .andDo(print()) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)")), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size")), responseFields( subsectionWithPath("_embedded.jobExecutionResourceList") .description("Contains a collection of Job Executions/"), @@ -135,10 +135,10 @@ void listThinJobExecutions() throws Exception { .andDo(print()) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)")), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size")), responseFields( subsectionWithPath("_embedded.jobExecutionThinResourceList") .description("Contains a collection of Job Executions without step executions included/"), @@ -157,10 +157,10 @@ void listThinJobExecutionsByJobInstanceId() throws Exception { .andDo(print()) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)"), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size"), parameterWithName("jobInstanceId") .description("Filter result by the job instance id")), responseFields( @@ -181,10 +181,10 @@ void listThinJobExecutionsByTaskExecutionId() throws Exception { .andDo(print()) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)"), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size"), parameterWithName("taskExecutionId") .description("Filter result by the task execution id")), responseFields( @@ -206,10 +206,10 @@ void listThinJobExecutionsByDate() throws Exception { .andDo(print()) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)"), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size"), parameterWithName("fromDate") .description("Filter result from a starting date in the format 'yyyy-MM-dd'T'HH:mm:ss,SSS'"), parameterWithName("toDate") @@ -232,10 +232,10 @@ void listJobExecutionsByName() throws Exception { .andDo(print()) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)"), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size"), parameterWithName("name") .description("The name associated with the job execution")), responseFields( @@ -256,10 +256,10 @@ void listThinJobExecutionsByName() throws Exception { .andDo(print()) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)"), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size"), parameterWithName("name") .description("The name associated with the job execution")), responseFields( @@ -278,7 +278,7 @@ void jobDisplayDetail() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters( - parameterWithName("id").description("The id of an existing job execution (required)") + parameterWithName("id").description("The id of an existing job execution") ), responseFields( fieldWithPath("executionId").description("The execution ID of the job execution"), @@ -313,9 +313,9 @@ void jobStop() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("id") - .description("The id of an existing job execution (required)")) + .description("The id of an existing job execution")) , queryParameters( - parameterWithName("stop") + parameterWithName("stop").optional() .description("Sends signal to stop the job if set to true")))); } @@ -328,12 +328,12 @@ void jobRestart() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("id") - .description("The id of an existing job execution (required)")) + .description("The id of an existing job execution")) , queryParameters( parameterWithName("useJsonJobParameters").description("If true dataflow will " + "serialize job parameters as JSON. Default is null, and the default " + "configuration will be used to determine serialization method.").optional(), - parameterWithName("restart") + parameterWithName("restart").optional() .description("Sends signal to restart the job if set to true") ) ) diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/JobInstancesDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/JobInstancesDocumentation.java index a0bc936650..fac9a3b5de 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/JobInstancesDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/JobInstancesDocumentation.java @@ -81,10 +81,10 @@ void listJobInstances() throws Exception { .param("size", "10")) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)"), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size"), parameterWithName("name") .description("The name associated with the job instance")), responseFields( @@ -102,7 +102,7 @@ void jobDisplayDetail() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters( - parameterWithName("id").description("The id of an existing job instance (required)") + parameterWithName("id").description("The id of an existing job instance") ), responseFields( fieldWithPath("jobName").description("The name of the job instance"), diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/JobStepExecutionsDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/JobStepExecutionsDocumentation.java index 9f0586f91c..8c0926cd8e 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/JobStepExecutionsDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/JobStepExecutionsDocumentation.java @@ -90,12 +90,12 @@ void listStepExecutionsForJob() throws Exception { .param("size", "10")) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)")), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size")), pathParameters(parameterWithName("id") - .description("The id of an existing job execution (required)")), + .description("The id of an existing job execution")), responseFields( subsectionWithPath("_embedded.stepExecutionResourceList") .description("Contains a collection of Step Executions/"), @@ -109,9 +109,9 @@ void stepDetail() throws Exception { get("/jobs/executions/{id}/steps/{stepid}", "1", "1")) .andExpect(status().isOk()).andDo(this.documentationHandler.document( pathParameters( - parameterWithName("id").description("The id of an existing job execution (required)"), + parameterWithName("id").description("The id of an existing job execution"), parameterWithName("stepid") - .description("The id of an existing step execution for a specific job execution (required)") + .description("The id of an existing step execution for a specific job execution") ), responseFields( fieldWithPath("jobExecutionId").description("The ID of the job step execution"), @@ -129,9 +129,9 @@ void stepProgress() throws Exception { get("/jobs/executions/{id}/steps/{stepid}/progress", "1", "1")) .andExpect(status().isOk()).andDo(this.documentationHandler.document( pathParameters( - parameterWithName("id").description("The id of an existing job execution (required)"), + parameterWithName("id").description("The id of an existing job execution"), parameterWithName("stepid") - .description("The id of an existing step execution for a specific job execution (required)") + .description("The id of an existing step execution for a specific job execution") ), responseFields( subsectionWithPath("stepExecution").description("The detailed step details of the job step execution"), diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/StreamDefinitionsDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/StreamDefinitionsDocumentation.java index b9e2909f7f..5a45207760 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/StreamDefinitionsDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/StreamDefinitionsDocumentation.java @@ -17,7 +17,6 @@ package org.springframework.cloud.dataflow.server.rest.documentation; import java.util.Arrays; -import java.util.concurrent.Callable; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.MethodOrderer.MethodName; @@ -76,7 +75,7 @@ void createDefinition() throws Exception { parameterWithName("name").description("The name for the created task definitions"), parameterWithName("definition").description("The definition for the stream, using Data Flow DSL"), parameterWithName("description").description("The description of the stream definition"), - parameterWithName("deploy") + parameterWithName("deploy").optional() .description("If true, the stream is deployed upon creation (default is false)")), responseFields( fieldWithPath("name").description("The name of the created stream definition"), @@ -110,10 +109,10 @@ void listAllStreamDefinitions() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page").description("The zero-based page number (optional)"), - parameterWithName("search").description("The search string performed on the name (optional)"), - parameterWithName("sort").description("The sort on the list (optional)"), - parameterWithName("size").description("The requested page size (optional)")), + parameterWithName("page").optional().description("The zero-based page number"), + parameterWithName("search").optional().description("The search string performed on the name"), + parameterWithName("sort").optional().description("The sort on the list"), + parameterWithName("size").optional().description("The requested page size")), responseFields( subsectionWithPath("_embedded.streamDefinitionResourceList") .description("Contains a collection of Stream Definitions"), @@ -135,7 +134,7 @@ void getStreamDefinition() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters( - parameterWithName("name").description("The name of the stream definition to query (required)") + parameterWithName("name").description("The name of the stream definition to query") ), responseFields( fieldWithPath("name").description("The name of the stream definition"), @@ -157,7 +156,7 @@ void getStreamApplications() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters( - parameterWithName("name").description("The name of the stream definition to query (required)") + parameterWithName("name").description("The name of the stream definition to query") ), responseFields( fieldWithPath("[]").description("An array of applications"), @@ -193,14 +192,14 @@ void listRelatedStreamDefinitions() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( queryParameters( - parameterWithName("nested") - .description("Should we recursively findByTaskNameContains for related stream definitions (optional)"), - parameterWithName("page").description("The zero-based page number (optional)"), - parameterWithName("search").description("The search string performed on the name (optional)"), - parameterWithName("sort").description("The sort on the list (optional)"), - parameterWithName("size").description("The requested page size (optional)")), + parameterWithName("nested").optional() + .description("Should we recursively findByTaskNameContains for related stream definitions"), + parameterWithName("page").optional().description("The zero-based page number"), + parameterWithName("search").optional().description("The search string performed on the name"), + parameterWithName("sort").optional().description("The sort on the list"), + parameterWithName("size").optional().description("The requested page size")), pathParameters(parameterWithName("name") - .description("The name of an existing stream definition (required)")), + .description("The name of an existing stream definition")), responseFields( subsectionWithPath("_embedded.streamDefinitionResourceList") .description("Contains a collection of Stream Definitions"), @@ -223,7 +222,7 @@ void streamDefinitionDelete1() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("name") - .description("The name of an existing stream definition (required)")) + .description("The name of an existing stream definition")) )); } diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/StreamDeploymentsDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/StreamDeploymentsDocumentation.java index af2e3fba48..aa65fe2746 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/StreamDeploymentsDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/StreamDeploymentsDocumentation.java @@ -92,11 +92,11 @@ void scale() throws Exception { .andExpect(status().isCreated()) .andDo(this.documentationHandler.document(pathParameters( parameterWithName("streamName") - .description("the name of an existing stream definition (required)"), - parameterWithName("appName") + .description("the name of an existing stream definition"), + parameterWithName("appName").optional() .description("in stream application name to scale"), parameterWithName("count") - .description("number of instances for the selected stream application (required)")) + .description("number of instances for the selected stream application")) )); } @@ -107,7 +107,7 @@ void unDeploy() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("timelog") - .description("The name of an existing stream definition (required)")) + .description("The name of an existing stream definition")) )); } @@ -130,8 +130,8 @@ void info() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("timelog") - .description("The name of an existing stream definition (required)")), - queryParameters(parameterWithName("reuse-deployment-properties") + .description("The name of an existing stream definition")), + queryParameters(parameterWithName("reuse-deployment-properties").optional() .description(parameterWithName("The name of the flag to reuse the deployment properties"))) )); } @@ -146,7 +146,7 @@ void deploy() throws Exception { .andExpect(status().isCreated()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("timelog") - .description("The name of an existing stream definition (required)")) + .description("The name of an existing stream definition")) )); } @@ -160,7 +160,7 @@ void streamUpdate() throws Exception { .andExpect(status().isCreated()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("timelog1") - .description("The name of an existing stream definition (required)")) + .description("The name of an existing stream definition")) )); UpdateStreamRequest updateStreamRequest = new UpdateStreamRequest(); updateStreamRequest.setReleaseName("timelog1"); @@ -181,7 +181,7 @@ void streamUpdate() throws Exception { .andExpect(status().isCreated()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("timelog1") - .description("The name of an existing stream definition (required)")) + .description("The name of an existing stream definition")) )); } @@ -195,7 +195,7 @@ void rollback() throws Exception { .andExpect(status().isCreated()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("name") - .description("The name of an existing stream definition (required)"), + .description("The name of an existing stream definition"), parameterWithName("version").description("The version to rollback to")))); } @@ -210,7 +210,7 @@ void history() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("name") - .description("The name of an existing stream definition (required)")))); + .description("The name of an existing stream definition")))); } @Test @@ -221,7 +221,7 @@ void manifest() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("name") - .description("The name of an existing stream definition (required)"), + .description("The name of an existing stream definition"), parameterWithName("version").description("The version of the stream")))); } diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/StreamValidationDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/StreamValidationDocumentation.java index ad6659e1f9..04e0a52b39 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/StreamValidationDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/StreamValidationDocumentation.java @@ -40,8 +40,6 @@ @TestMethodOrder(MethodOrderer.MethodName.class) class StreamValidationDocumentation extends BaseDocumentation { - private static boolean setUpIsDone = false; - @BeforeEach void setup() throws Exception { this.mockMvc.perform( @@ -71,7 +69,7 @@ void validateStream() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters( - parameterWithName("name").description("The name of a stream definition to be validated (required)") + parameterWithName("name").description("The name of a stream definition to be validated") ), responseFields( fieldWithPath("appName").description("The name of a stream definition"), diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskDefinitionsDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskDefinitionsDocumentation.java index f17c089a39..fc093b9c06 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskDefinitionsDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskDefinitionsDocumentation.java @@ -69,7 +69,7 @@ void createDefinition() throws Exception { queryParameters( parameterWithName("name").description("The name for the created task definition"), parameterWithName("definition").description("The definition for the task, using Data Flow DSL"), - parameterWithName("description").description("The description of the task definition") + parameterWithName("description").optional().description("The description of the task definition") ), responseFields( fieldWithPath("name").description("The name of the created task definition"), @@ -104,11 +104,11 @@ void listAllTaskDefinitions() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page").description("The zero-based page number (optional)"), - parameterWithName("size").description("The requested page size (optional)"), - parameterWithName("search").description("The search string performed on the name (optional)"), - parameterWithName("sort").description("The sort on the list (optional)"), - parameterWithName("manifest").description("The flag to include the task manifest into the latest task execution (optional)") + parameterWithName("page").optional().description("The zero-based page number"), + parameterWithName("size").optional().description("The requested page size"), + parameterWithName("search").optional().description("The search string performed on the name"), + parameterWithName("sort").optional().description("The sort on the list"), + parameterWithName("manifest").optional().description("The flag to include the task manifest into the latest task execution") ), responseFields( subsectionWithPath("_embedded.taskDefinitionResourceList") @@ -132,10 +132,10 @@ void displayDetail() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters( - parameterWithName("my-task").description("The name of an existing task definition (required)") + parameterWithName("my-task").description("The name of an existing task definition") ), queryParameters( - parameterWithName("manifest").description("The flag to include the task manifest into the latest task execution (optional)") + parameterWithName("manifest").optional().description("The flag to include the task manifest into the latest task execution") ), responseFields( fieldWithPath("name").description("The name of the created task definition"), @@ -166,9 +166,9 @@ void taskDefinitionDelete() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters( - parameterWithName("my-task").description("The name of an existing task definition (required)")), + parameterWithName("my-task").description("The name of an existing task definition")), queryParameters( - parameterWithName("cleanup").description("The flag to indicate if the associated task executions needed to be cleaned up") + parameterWithName("cleanup").optional().description("The flag to indicate if the associated task executions needed to be cleaned up") ) )); } diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskExecutionsDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskExecutionsDocumentation.java index f1936fbcc5..99f0fb9f9b 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskExecutionsDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskExecutionsDocumentation.java @@ -85,10 +85,10 @@ void launchTaskBoot3() throws Exception { .andDo(this.documentationHandler.document( queryParameters( parameterWithName("name").description("The name of the task definition to launch"), - parameterWithName("properties") - .description("Application and Deployer properties to use while launching. (optional)"), - parameterWithName("arguments") - .description("Command line arguments to pass to the task. (optional)")), + parameterWithName("properties").optional() + .description("Application and Deployer properties to use while launching."), + parameterWithName("arguments").optional() + .description("Command line arguments to pass to the task.")), responseFields( fieldWithPath("executionId").description("The id of the task execution"), subsectionWithPath("_links.self").description("Link to the task execution resource"), @@ -110,10 +110,10 @@ void launchTask() throws Exception { .andDo(this.documentationHandler.document( queryParameters( parameterWithName("name").description("The name of the task definition to launch"), - parameterWithName("properties") - .description("Application and Deployer properties to use while launching. (optional)"), - parameterWithName("arguments") - .description("Command line arguments to pass to the task. (optional)") + parameterWithName("properties").optional() + .description("Application and Deployer properties to use while launching."), + parameterWithName("arguments").optional() + .description("Command line arguments to pass to the task.") ) ) ); @@ -143,7 +143,7 @@ void getTaskDisplayDetail() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters( - parameterWithName("id").description("The id of an existing task execution (required)") + parameterWithName("id").description("The id of an existing task execution") ), responseFields( fieldWithPath("executionId").description("The id of the task execution"), @@ -192,10 +192,10 @@ void getTaskDisplayDetailByExternalId() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters( - parameterWithName("externalExecutionId").description("The external ExecutionId of an existing task execution (required)") + parameterWithName("externalExecutionId").description("The external ExecutionId of an existing task execution") ), queryParameters( - parameterWithName("platform").description("The name of the platform.") + parameterWithName("platform").optional().description("The name of the platform.") ), responseFields( fieldWithPath("executionId").description("The id of the task execution"), @@ -233,15 +233,18 @@ void listTaskExecutions() throws Exception { this.mockMvc.perform( get("/tasks/executions") - .queryParam("page", "1") - .queryParam("size", "2")) + .queryParam("page", "0") + .queryParam("size", "10") + .queryParam("sort", "END_TIME,desc")) .andDo(print()) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)") + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size"), + parameterWithName("sort").optional() + .description("The sort criteria. column name and optional sort direction. Example: END_TIME,desc") ), responseFields( subsectionWithPath("_embedded.taskExecutionResourceList") @@ -278,15 +281,19 @@ void listTaskThinExecutions() throws Exception { this.mockMvc.perform( get("/tasks/thinexecutions") - .queryParam("page", "1") - .queryParam("size", "2")) + .queryParam("page", "0") + .queryParam("size", "10") + .queryParam("sort", "END_TIME,desc") + ) .andDo(print()) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)") + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size"), + parameterWithName("sort").optional() + .description("The sort criteria. column name and optional sort direction (optional). Example: END_TIME,desc") ), responseFields( subsectionWithPath("_embedded.taskExecutionThinResourceList") @@ -318,15 +325,19 @@ void listTaskThinExecutionsByName() throws Exception { .queryParam("name", "taskB") .queryParam("page", "0") .queryParam("size", "10") + .queryParam("sort", "END_TIME,desc") ) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)"), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size"), parameterWithName("name") - .description("The name associated with the task execution")), + .description("The name associated with the task execution"), + parameterWithName("sort").optional() + .description("The sort criteria. column name and optional sort direction (optional). Example: END_TIME,desc") + ), responseFields( subsectionWithPath("_embedded.taskExecutionThinResourceList") .description("Contains a collection of thin Task Executions/"), @@ -340,15 +351,18 @@ void listTaskExecutionsByName() throws Exception { .queryParam("name", "taskB") .queryParam("page", "0") .queryParam("size", "10") + .queryParam("sort", "END_TIME,desc") ) .andExpect(status().isOk()).andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)"), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size"), parameterWithName("name") - .description("The name associated with the task execution")), + .description("The name associated with the task execution"), + parameterWithName("sort").optional() + .description("The sort criteria. column name and optional sort direction (optional). Example: END_TIME,desc")), responseFields( subsectionWithPath("_embedded.taskExecutionResourceList") .description("Contains a collection of Task Executions/"), @@ -371,7 +385,7 @@ void stopTask() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters( - parameterWithName("id").description("The ids of an existing task execution (required)") + parameterWithName("id").description("The ids of an existing task execution") ) ) ); @@ -391,9 +405,9 @@ void taskExecutionRemove() throws Exception { delete("/tasks/executions/{ids}?action=CLEANUP", "1")) .andExpect(status().isOk()) .andDo(this.documentationHandler.document( - queryParameters(parameterWithName("action").description("Optional. Defaults to: CLEANUP.")), + queryParameters(parameterWithName("action").optional().description("Defaults to: CLEANUP.")), pathParameters(parameterWithName("ids") - .description("The id of an existing task execution (required). Multiple comma separated values are accepted.")) + .description("The id of an existing task execution. Multiple comma separated values are accepted.")) )); } @@ -404,7 +418,7 @@ void taskExecutionRemoveAndTaskDataRemove() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( queryParameters( - parameterWithName("action").description("Using both actions CLEANUP and REMOVE_DATA simultaneously.") + parameterWithName("action").optional().description("Using both actions CLEANUP and REMOVE_DATA simultaneously.") ), pathParameters(parameterWithName("ids") .description("Providing 2 comma separated task execution id values.") diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskLogsDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskLogsDocumentation.java index 5f9ecefe8a..742811e486 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskLogsDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskLogsDocumentation.java @@ -68,7 +68,7 @@ void getLogsByTaskId() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( queryParameters( - parameterWithName("platformName").description("The name of the platform the task is launched.")) + parameterWithName("platformName").optional().description("The name of the platform the task is launched.")) )); } diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskPlatformDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskPlatformDocumentation.java index 2f0c294a72..36b2479e96 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskPlatformDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskPlatformDocumentation.java @@ -46,10 +46,10 @@ void listTaskPlatforms() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)")), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size")), responseFields( subsectionWithPath("_embedded.launcherResourceList") .description("Contains a collection of Platform accounts for tasks"), diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskSchedulerDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskSchedulerDocumentation.java index 9f1ca0b4b6..f6997ecf10 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskSchedulerDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskSchedulerDocumentation.java @@ -70,12 +70,12 @@ void createSchedule() throws Exception { .andDo(this.documentationHandler.document( queryParameters( parameterWithName("scheduleName").description("The name for the created schedule"), - parameterWithName("platform").description("The name of the platform the task is launched"), + parameterWithName("platform").optional().description("The name of the platform the task is launched"), parameterWithName("taskDefinitionName") .description("The name of the task definition to be scheduled"), parameterWithName("properties") .description("the properties that are required to schedule and launch the task"), - parameterWithName("arguments").description("the command line arguments to be used for launching the task")))); + parameterWithName("arguments").optional().description("the command line arguments to be used for launching the task")))); } @Test @@ -85,7 +85,7 @@ void deleteSchedule() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("scheduleName") - .description("The name of an existing schedule (required)")))); + .description("The name of an existing schedule")))); } @Test @@ -98,12 +98,12 @@ void listFilteredSchedules() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters(parameterWithName("task-definition-name") - .description("Filter schedules based on the specified task definition (required)")), + .description("Filter schedules based on the specified task definition")), queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), - parameterWithName("size") - .description("The requested page size (optional)")), + parameterWithName("page").optional() + .description("The zero-based page number"), + parameterWithName("size").optional() + .description("The requested page size")), responseFields( subsectionWithPath("_embedded.scheduleInfoResourceList") .description("Contains a collection of Schedules/"), @@ -121,10 +121,10 @@ void listAllSchedules() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( queryParameters( - parameterWithName("page") - .description("The zero-based page number (optional)"), + parameterWithName("page").optional() + .description("The zero-based page number"), parameterWithName("size") - .description("The requested page size (optional)")), + .description("The requested page size")), responseFields( subsectionWithPath("_embedded.scheduleInfoResourceList") .description("Contains a collection of Schedules/"), diff --git a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskValidationDocumentation.java b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskValidationDocumentation.java index c9854b3504..7f9a20bc24 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskValidationDocumentation.java +++ b/spring-cloud-dataflow-classic-docs/src/test/java/org/springframework/cloud/dataflow/server/rest/documentation/TaskValidationDocumentation.java @@ -63,7 +63,7 @@ void validateTask() throws Exception { .andExpect(status().isOk()) .andDo(this.documentationHandler.document( pathParameters( - parameterWithName("name").description("The name of a task definition to be validated (required)") + parameterWithName("name").description("The name of a task definition to be validated") ), responseFields( fieldWithPath("appName").description("The name of a task definition"), diff --git a/spring-cloud-dataflow-classic-docs/src/test/resources/org/springframework/restdocs/templates/asciidoctor/path-parameters.snippet b/spring-cloud-dataflow-classic-docs/src/test/resources/org/springframework/restdocs/templates/asciidoctor/path-parameters.snippet index da64dda944..dfd62e5661 100644 --- a/spring-cloud-dataflow-classic-docs/src/test/resources/org/springframework/restdocs/templates/asciidoctor/path-parameters.snippet +++ b/spring-cloud-dataflow-classic-docs/src/test/resources/org/springframework/restdocs/templates/asciidoctor/path-parameters.snippet @@ -1,10 +1,11 @@ -{{path}} +`*{{path}}*` |=== -|Parameter|Description +|Parameter - Description {{#parameters}} -|{{#tableCellContent}}`+{{name}}+`{{/tableCellContent}} -|{{#tableCellContent}}{{description}}{{/tableCellContent}} +|{{#tableCellContent}}`*{{name}}*` {{#optional}} [small]#_(optional)_#{{/optional}}{{^optional}} [small]#*(required)*#{{/optional}}{{/tableCellContent}} + +{{#tableCellContent}}{{description}}{{/tableCellContent}} {{/parameters}} |=== \ No newline at end of file diff --git a/spring-cloud-dataflow-classic-docs/src/test/resources/org/springframework/restdocs/templates/asciidoctor/query-parameters.snippet b/spring-cloud-dataflow-classic-docs/src/test/resources/org/springframework/restdocs/templates/asciidoctor/query-parameters.snippet new file mode 100644 index 0000000000..a0712f5952 --- /dev/null +++ b/spring-cloud-dataflow-classic-docs/src/test/resources/org/springframework/restdocs/templates/asciidoctor/query-parameters.snippet @@ -0,0 +1,9 @@ +|=== +|Parameter - Description +{{#parameters}} +|{{#tableCellContent}}`*{{name}}*` {{#optional}} [small]#_(optional)_#{{/optional}}{{^optional}} [small]#*(required)*#{{/optional}}{{/tableCellContent}} + +{{#tableCellContent}}{{description}}{{/tableCellContent}} + +{{/parameters}} +|=== \ No newline at end of file diff --git a/spring-cloud-dataflow-docs/src/main/asciidoc/api-guide.adoc b/spring-cloud-dataflow-docs/src/main/asciidoc/api-guide.adoc index b4ebd95915..758887959a 100644 --- a/spring-cloud-dataflow-docs/src/main/asciidoc/api-guide.adoc +++ b/spring-cloud-dataflow-docs/src/main/asciidoc/api-guide.adoc @@ -309,7 +309,7 @@ include::{snippets}/app-registry-documentation/get-applications-filtered/http-re [[api-guide-resources-app-registry-request-parameters]] ===== Request Parameters -include::{snippets}/app-registry-documentation/get-applications-filtered/request-parameters.adoc[] +include::{snippets}/app-registry-documentation/get-applications-filtered/query-parameters.adoc[] @@ -350,7 +350,7 @@ include::{snippets}/app-registry-documentation/get-single-application/http-reque [[api-guide-resources-app-registry-get-request-parameters]] ===== Request Parameters -include::{snippets}/app-registry-documentation/get-single-application/request-parameters.adoc[] +include::{snippets}/app-registry-documentation/get-single-application/query-parameters.adoc[] @@ -399,7 +399,7 @@ include::{snippets}/app-registry-documentation/registering-an-application/http-r [[api-guide-resources-app-registry-post-request-parameters]] ===== Request Parameters -include::{snippets}/app-registry-documentation/registering-an-application/request-parameters.adoc[] +include::{snippets}/app-registry-documentation/registering-an-application/query-parameters.adoc[] @@ -445,7 +445,7 @@ include::{snippets}/app-registry-documentation/registering-an-application-versio [[api-guide-resources-app-registry-post-versioned-request-parameters]] ===== Request Parameters -include::{snippets}/app-registry-documentation/registering-an-application-version/request-parameters.adoc[] +include::{snippets}/app-registry-documentation/registering-an-application-version/query-parameters.adoc[] @@ -493,7 +493,7 @@ include::{snippets}/app-registry-documentation/bulk-registering-apps/http-reques [[api-guide-resources-app-registry-bulk-request-parameters]] ===== Request Parameters -include::{snippets}/app-registry-documentation/bulk-registering-apps/request-parameters.adoc[] +include::{snippets}/app-registry-documentation/bulk-registering-apps/query-parameters.adoc[] @@ -717,7 +717,7 @@ include::{snippets}/audit-records-documentation/list-all-audit-records/http-requ [[api-guide-resources-audit-records-list-request-parameters]] ===== Request Parameters -include::{snippets}/audit-records-documentation/list-all-audit-records/request-parameters.adoc[] +include::{snippets}/audit-records-documentation/list-all-audit-records/query-parameters.adoc[] [[api-guide-resources-audit-records-list-example-request]] ===== Example Request @@ -864,7 +864,7 @@ include::{snippets}/stream-definitions-documentation/create-definition/http-requ [[api-guide-resources-stream-definitions-create-request-parameters]] ===== Request Parameters -include::{snippets}/stream-definitions-documentation/create-definition/request-parameters.adoc[] +include::{snippets}/stream-definitions-documentation/create-definition/query-parameters.adoc[] @@ -904,7 +904,7 @@ include::{snippets}/stream-definitions-documentation/list-all-stream-definitions [[api-guide-resources-stream-definitions-list-request-parameters]] ===== Request Parameters -include::{snippets}/stream-definitions-documentation/list-all-stream-definitions/request-parameters.adoc[] +include::{snippets}/stream-definitions-documentation/list-all-stream-definitions/query-parameters.adoc[] [[api-guide-resources-stream-definitions-list-example-request]] @@ -944,7 +944,7 @@ include::{snippets}/stream-definitions-documentation/list-related-stream-definit [[api-guide-resources-stream-definitions-list-related-request-parameters]] ===== Request Parameters -include::{snippets}/stream-definitions-documentation/list-related-stream-definitions/request-parameters.adoc[] +include::{snippets}/stream-definitions-documentation/list-related-stream-definitions/query-parameters.adoc[] @@ -1501,7 +1501,7 @@ include::{snippets}/task-definitions-documentation/create-definition/http-reques [[api-guide-resources-stream-task-definitions-creating-request-parameters]] ===== Request Parameters -include::{snippets}/task-definitions-documentation/create-definition/request-parameters.adoc[] +include::{snippets}/task-definitions-documentation/create-definition/query-parameters.adoc[] @@ -1542,7 +1542,7 @@ include::{snippets}/task-definitions-documentation/list-all-task-definitions/htt [[api-guide-resources-stream-task-definitions-list-request-parameters]] ===== Request Parameters -include::{snippets}/task-definitions-documentation/list-all-task-definitions/request-parameters.adoc[] +include::{snippets}/task-definitions-documentation/list-all-task-definitions/query-parameters.adoc[] @@ -1679,7 +1679,7 @@ include::{snippets}/task-scheduler-documentation/create-schedule/http-request.ad [[api-guide-resources-stream-task-schedule-creating-request-parameters]] ===== Request Parameters -include::{snippets}/task-scheduler-documentation/create-schedule/request-parameters.adoc[] +include::{snippets}/task-scheduler-documentation/create-schedule/query-parameters.adoc[] @@ -1720,7 +1720,7 @@ include::{snippets}/task-scheduler-documentation/list-all-schedules/http-request [[api-guide-resources-stream-task-schedule-list-request-parameters]] ===== Request Parameters -include::{snippets}/task-scheduler-documentation/list-all-schedules/request-parameters.adoc[] +include::{snippets}/task-scheduler-documentation/list-all-schedules/query-parameters.adoc[] @@ -1760,7 +1760,7 @@ include::{snippets}/task-scheduler-documentation/list-filtered-schedules/path-pa [[api-guide-resources-stream-task-schedule-list-filtered-request-parameters]] ===== Request Parameters -include::{snippets}/task-scheduler-documentation/list-filtered-schedules/request-parameters.adoc[] +include::{snippets}/task-scheduler-documentation/list-filtered-schedules/query-parameters.adoc[] @@ -1890,7 +1890,7 @@ include::{snippets}/task-executions-documentation/launch-task/http-request.adoc[ [[api-guide-resources-task-executions-launching-request-parameters]] ===== Request Parameters -include::{snippets}/task-executions-documentation/launch-task/request-parameters.adoc[] +include::{snippets}/task-executions-documentation/launch-task/query-parameters.adoc[] @@ -1928,7 +1928,7 @@ include::{snippets}/task-executions-documentation/launch-task-boot3/http-request [[api-guide-resources-task-executions-launching-boot3-request-parameters]] ===== Request Parameters -include::{snippets}/task-executions-documentation/launch-task-boot3/request-parameters.adoc[] +include::{snippets}/task-executions-documentation/launch-task-boot3/query-parameters.adoc[] @@ -1973,7 +1973,7 @@ include::{snippets}/task-executions-documentation/stop-task/path-parameters.adoc [[api-guide-resources-task-executions-stopping-request-parameters]] ===== Request Parameters -include::{snippets}/task-executions-documentation/stop-task/request-parameters.adoc[] +include::{snippets}/task-executions-documentation/stop-task/query-parameters.adoc[] [[api-guide-resources-task-executions-stopping-example-request]] ===== Example Request @@ -2009,7 +2009,7 @@ include::{snippets}/task-executions-documentation/list-task-executions/http-requ [[api-guide-resources-task-executions-list-request-parameters]] ===== Request Parameters -include::{snippets}/task-executions-documentation/list-task-executions/request-parameters.adoc[] +include::{snippets}/task-executions-documentation/list-task-executions/query-parameters.adoc[] @@ -2050,7 +2050,7 @@ include::{snippets}/task-executions-documentation/list-task-executions-by-name/h [[api-guide-resources-task-executions-list-by-name-request-parameters]] ===== Request Parameters -include::{snippets}/task-executions-documentation/list-task-executions-by-name/request-parameters.adoc[] +include::{snippets}/task-executions-documentation/list-task-executions-by-name/query-parameters.adoc[] @@ -2079,6 +2079,85 @@ The following topics provide more details: * <> +[[api-guide-resources-task-thin-executions-list]] +==== List All Task Thin Executions + +The task executions endpoint lets you list all task executions with only top-level data. +The following topics provide more details: + +* <> +* <> +* <> +* <> + + + +[[api-guide-resources-task-thin-executions-list-request-structure]] +===== Request Structure + +include::{snippets}/task-executions-documentation/list-task-thin-executions/http-request.adoc[] + + + +[[api-guide-resources-task-thin-executions-list-request-parameters]] +===== Request Parameters + +include::{snippets}/task-executions-documentation/list-task-thin-executions/query-parameters.adoc[] + + + +[[api-guide-resources-task-thin-executions-list-example-request]] +===== Example Request + +include::{snippets}/task-executions-documentation/list-task-thin-executions/curl-request.adoc[] + + + +[[api-guide-resources-task-thin-executions-list-response-structure]] +===== Response Structure + +include::{snippets}/task-executions-documentation/list-task-thin-executions/http-response.adoc[] + + + +[[api-guide-resources-task-thin-executions-list-by-name]] +==== List All Task Thin Executions With a Specified Task Name + +The task thin executions endpoint lets you list task executions with a specified task name. +The following topics provide more details: + +* <> +* <> +* <> +* <> + + + +[[api-guide-resources-task-thin-executions-list-by-name-request-structure]] +===== Request Structure + +include::{snippets}/task-executions-documentation/list-task-thin-executions-by-name/http-request.adoc[] + + + +[[api-guide-resources-task-thin-executions-list-by-name-request-parameters]] +===== Request Parameters + +include::{snippets}/task-executions-documentation/list-task-thin-executions-by-name/query-parameters.adoc[] + + + +[[api-guide-resources-task-thin-executions-list-by-name-example-request]] +===== Example Request + +include::{snippets}/task-executions-documentation/list-task-thin-executions-by-name/curl-request.adoc[] + + + +[[api-guide-resources-task-thin-executions-list-by-name-response-structure]] +===== Response Structure + +include::{snippets}/task-executions-documentation/list-task-thin-executions-by-name/http-response.adoc[] [[api-guide-resources-task-thin-executions-list-request-structure]] ===== Request Structure @@ -2273,7 +2352,7 @@ values: - CLEANUP - REMOVE_DATA -include::{snippets}/task-executions-documentation/task-execution-remove-and-task-data-remove/request-parameters.adoc[] +include::{snippets}/task-executions-documentation/task-execution-remove-and-task-data-remove/query-parameters.adoc[] [[api-guide-resources-task-executions-delete-example-request]] ===== Example Request @@ -2298,7 +2377,7 @@ include::{snippets}/task-executions-documentation/task-execution-remove-and-task include::{snippets}/task-executions-documentation/task-execution-remove-and-task-data-remove/path-parameters.adoc[] -include::{snippets}/task-executions-documentation/task-execution-remove-and-task-data-remove/request-parameters.adoc[] +include::{snippets}/task-executions-documentation/task-execution-remove-and-task-data-remove/query-parameters.adoc[] IMPORTANT: When deleting data from the persistence store by using the `REMOVE_DATA` action parameter, you must provide task execution IDs that represent parent task executions. When you provide child task executions (executed as part of a composed task), @@ -2384,7 +2463,7 @@ include::{snippets}/job-executions-documentation/list-job-executions/http-reques [[api-guide-resources-job-executions-list-request-parameters]] ===== Request Parameters -include::{snippets}/job-executions-documentation/list-job-executions/request-parameters.adoc[] +include::{snippets}/job-executions-documentation/list-job-executions/query-parameters.adoc[] @@ -2423,7 +2502,7 @@ include::{snippets}/job-executions-documentation/list-thin-job-executions/http-r [[api-guide-resources-job-executions-thin-job-execution-list-request-parameters]] ===== Request Parameters -include::{snippets}/job-executions-documentation/list-thin-job-executions/request-parameters.adoc[] +include::{snippets}/job-executions-documentation/list-thin-job-executions/query-parameters.adoc[] @@ -2462,7 +2541,7 @@ include::{snippets}/job-executions-documentation/list-job-executions-by-name/htt [[api-guide-resources-job-executions-list-by-name-request-parameters]] ===== Request Parameters -include::{snippets}/job-executions-documentation/list-job-executions-by-name/request-parameters.adoc[] +include::{snippets}/job-executions-documentation/list-job-executions-by-name/query-parameters.adoc[] @@ -2501,7 +2580,7 @@ include::{snippets}/job-executions-documentation/list-thin-job-executions-by-nam [[api-guide-resources-job-executions-thin-list-by-name-request-parameters]] ===== Request Parameters -include::{snippets}/job-executions-documentation/list-thin-job-executions-by-name/request-parameters.adoc[] +include::{snippets}/job-executions-documentation/list-thin-job-executions-by-name/query-parameters.adoc[] @@ -2540,7 +2619,7 @@ include::{snippets}/job-executions-documentation/list-thin-job-executions-by-dat [[api-guide-resources-job-executions-thin-list-by-date-request-parameters]] ===== Request Parameters -include::{snippets}/job-executions-documentation/list-thin-job-executions-by-date/request-parameters.adoc[] +include::{snippets}/job-executions-documentation/list-thin-job-executions-by-date/query-parameters.adoc[] @@ -2579,7 +2658,7 @@ include::{snippets}/job-executions-documentation/list-thin-job-executions-by-job [[api-guide-resources-job-executions-thin-list-by-job-instance-id-request-parameters]] ===== Request Parameters -include::{snippets}/job-executions-documentation/list-thin-job-executions-by-job-instance-id/request-parameters.adoc[] +include::{snippets}/job-executions-documentation/list-thin-job-executions-by-job-instance-id/query-parameters.adoc[] @@ -2618,7 +2697,7 @@ include::{snippets}/job-executions-documentation/list-thin-job-executions-by-tas [[api-guide-resources-job-executions-thin-list-by-task-execution-id-request-parameters]] ===== Request Parameters -include::{snippets}/job-executions-documentation/list-thin-job-executions-by-task-execution-id/request-parameters.adoc[] +include::{snippets}/job-executions-documentation/list-thin-job-executions-by-task-execution-id/query-parameters.adoc[] @@ -2702,7 +2781,7 @@ include::{snippets}/job-executions-documentation/job-stop/path-parameters.adoc[] [[api-guide-resources-job-executions-stop-request-parameters]] ===== Request parameters -include::{snippets}/job-executions-documentation/job-stop/request-parameters.adoc[] +include::{snippets}/job-executions-documentation/job-stop/query-parameters.adoc[] @@ -2797,7 +2876,7 @@ include::{snippets}/job-instances-documentation/list-job-instances/http-request. [[api-guide-resources-job-instances-list-request-parameters]] ===== Request Parameters -include::{snippets}/job-instances-documentation/list-job-instances/request-parameters.adoc[] +include::{snippets}/job-instances-documentation/list-job-instances/query-parameters.adoc[] @@ -2893,7 +2972,7 @@ include::{snippets}/job-step-executions-documentation/list-step-executions-for-j [[api-guide-resources-job-step-executions-list-request-parameters]] ===== Request Parameters -include::{snippets}/job-step-executions-documentation/list-step-executions-for-job/request-parameters.adoc[] +include::{snippets}/job-step-executions-documentation/list-step-executions-for-job/query-parameters.adoc[] @@ -3207,7 +3286,7 @@ include::{snippets}/task-logs-documentation/get-logs-by-task-id/http-request.ado [[api-guide-resources-task-logs-by-task-id-request-parameters]] ===== Request Parameters -include::{snippets}/task-logs-documentation/get-logs-by-task-id/request-parameters.adoc[] +include::{snippets}/task-logs-documentation/get-logs-by-task-id/query-parameters.adoc[] [[api-guide-resources-task-logs-by-task-id-example-request]] ===== Example Request diff --git a/spring-cloud-skipper/spring-cloud-skipper-server-core/src/test/java/org/springframework/cloud/skipper/server/controller/docs/BaseDocumentation.java b/spring-cloud-skipper/spring-cloud-skipper-server-core/src/test/java/org/springframework/cloud/skipper/server/controller/docs/BaseDocumentation.java index af357adfe4..53b1aa4588 100644 --- a/spring-cloud-skipper/spring-cloud-skipper-server-core/src/test/java/org/springframework/cloud/skipper/server/controller/docs/BaseDocumentation.java +++ b/spring-cloud-skipper/spring-cloud-skipper-server-core/src/test/java/org/springframework/cloud/skipper/server/controller/docs/BaseDocumentation.java @@ -155,8 +155,8 @@ public abstract class BaseDocumentation { * Snippet for common pagination-related request parameters. */ protected final QueryParametersSnippet paginationRequestParameterProperties = queryParameters( - parameterWithName("page").description("The zero-based page number (optional)"), - parameterWithName("size").description("The requested page size (optional)")); + parameterWithName("page").optional().description("The zero-based page number"), + parameterWithName("size").optional().description("The requested page size")); protected RestDocumentationResultHandler documentationHandler; /**