-
Notifications
You must be signed in to change notification settings - Fork 480
create new endpoint to retrieve workflow schemas by multiple Content Types #35729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dario-daza
wants to merge
12
commits into
main
Choose a base branch
from
35471-task-content-drive-endpoint-to-return-workflow-schemes-for-a-list-of-content-types
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,042
−989
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
cdf8ac1
improve postman workflow tests
dario-daza 365417b
update postman test
dario-daza f01f88e
create new endpoint to get workflows by content type
dario-daza 741313f
add integration test
dario-daza 8cafec7
fix integration test
dario-daza 6708222
fix openapi
dario-daza 98495f2
add test to check the new endpoint for workflow schemas by content type
dario-daza 1379212
fix endpoint call and add javadoc to the response
dario-daza 97bd12b
Merge branch 'main' into 35471-task-content-drive-endpoint-to-return-…
fabrizzio-dotCMS 40ae61d
refactor findAllSchemesByContentTypeList batch safety, input cap, dua…
dario-daza 5e167e0
fix comments
dario-daza 5927784
fix openapi file
dario-daza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...src/main/java/com/dotcms/rest/api/v1/workflow/AbstractContentTypeWorkflowSchemesView.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package com.dotcms.rest.api.v1.workflow; | ||
|
|
||
| import com.dotmarketing.portlets.workflows.model.WorkflowScheme; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
| import com.fasterxml.jackson.databind.annotation.JsonSerialize; | ||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import java.util.List; | ||
| import org.immutables.value.Value; | ||
|
|
||
| @Value.Style(typeImmutable = "*", typeAbstract = "Abstract*") | ||
| @Value.Immutable | ||
| @JsonSerialize(as = ContentTypeWorkflowSchemesView.class) | ||
| @JsonDeserialize(as = ContentTypeWorkflowSchemesView.class) | ||
| @Schema(description = "Workflow schemes associated with a specific content type") | ||
| public interface AbstractContentTypeWorkflowSchemesView { | ||
|
|
||
| @JsonProperty("contentTypeId") | ||
| @Schema( | ||
| description = "Identifier of the content type", | ||
| requiredMode = Schema.RequiredMode.REQUIRED | ||
| ) | ||
| String contentTypeId(); | ||
|
|
||
| @JsonProperty("contentTypeSchemes") | ||
| @Schema( | ||
| description = "Workflow schemes associated with the content type", | ||
| requiredMode = Schema.RequiredMode.REQUIRED | ||
| ) | ||
| List<WorkflowScheme> contentTypeSchemes(); | ||
| } |
21 changes: 21 additions & 0 deletions
21
...in/java/com/dotcms/rest/api/v1/workflow/ResponseEntityContentTypeWorkflowSchemesView.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package com.dotcms.rest.api.v1.workflow; | ||
|
|
||
| import com.dotcms.rest.ResponseEntityView; | ||
| import java.util.List; | ||
|
|
||
| /** | ||
| * Response entity wrapping a list of {@link ContentTypeWorkflowSchemesView}, one entry per | ||
| * content type, each pairing a content type identifier with its associated workflow schemes. | ||
| * Used by the {@code GET /api/v1/workflow/contenttypes/schemes} endpoint. | ||
| */ | ||
| public class ResponseEntityContentTypeWorkflowSchemesView extends | ||
| ResponseEntityView<List<ContentTypeWorkflowSchemesView>> { | ||
|
|
||
| /** | ||
| * @param contentTypeWorkflowSchemesView list of content-type/scheme associations to return | ||
| */ | ||
| public ResponseEntityContentTypeWorkflowSchemesView( | ||
| final List<ContentTypeWorkflowSchemesView> contentTypeWorkflowSchemesView) { | ||
| super(contentTypeWorkflowSchemesView); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
dotCMS/src/main/java/com/dotmarketing/portlets/templates/design/bean/LayoutChanges.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.