-
Notifications
You must be signed in to change notification settings - Fork 461
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
Issue 25661 add an attribute to each and every piece of json that conforms the cli bundle #25731
Merged
nollymar
merged 7 commits into
master
from
issue-25661-add-an-attribute-to-each-and-every-piece-of-json-that-conforms-the-CLI-Bundle
Aug 14, 2023
Merged
Issue 25661 add an attribute to each and every piece of json that conforms the cli bundle #25731
nollymar
merged 7 commits into
master
from
issue-25661-add-an-attribute-to-each-and-every-piece-of-json-that-conforms-the-CLI-Bundle
Aug 14, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…models Added a "dotCMSObjectType" field to the language, content type, and site models in the project to get better clarity. Additionally, new tests have been added to LanguageCommandTest, ContentTypeCommandTest, and SiteCommandTest. These tests ensure that the "dotCMSObjectType" field is present in the JSON and YAML files generated when the pull command is executed for languages, content types, and sites respectively. This addition helps in identifying the object type when reviewing the JSON or YAML files, improving maintainability and understandability of the codes and files.
This commit introduces JsonViews in AbstractLanguage, ContentType, and AbstractSiteView classes. This helps manage different JSON views and control serialization for different use cases. A JsonProperty "dotCMSObjectType" has been added to the ContentType class. Test cases for Content Type, Site and Language have been updated to include a command to push the changes back to the server, ensuring the structure is still correct. New functionalities for creating and updating language and content type have been provided with the ExternalView of Json, adding more security to the API calls. The CommonViews class has been added to handle different views for JSON serialization. This change enhances the control over data visibility in different scenarios.
…attribute-to-each-and-every-piece-of-json-that-conforms-the-CLI-Bundle # Conflicts: # tools/dotcms-cli/cli/src/test/java/com/dotcms/cli/command/contenttype/ContentTypeCommandTest.java # tools/dotcms-cli/cli/src/test/java/com/dotcms/cli/command/site/SiteCommandTest.java
nollymar
approved these changes
Aug 10, 2023
…very-piece-of-json-that-conforms-the-CLI-Bundle
jdotcms
approved these changes
Aug 12, 2023
nollymar
deleted the
issue-25661-add-an-attribute-to-each-and-every-piece-of-json-that-conforms-the-CLI-Bundle
branch
August 14, 2023 19:15
fmontes
pushed a commit
that referenced
this pull request
Aug 14, 2023
* Issue 25661 add an attribute to each and every piece of json that conforms the cli bundle (#25731) * #25661 Add dotCMSObjectType field to language, content type and site models Added a "dotCMSObjectType" field to the language, content type, and site models in the project to get better clarity. Additionally, new tests have been added to LanguageCommandTest, ContentTypeCommandTest, and SiteCommandTest. These tests ensure that the "dotCMSObjectType" field is present in the JSON and YAML files generated when the pull command is executed for languages, content types, and sites respectively. This addition helps in identifying the object type when reviewing the JSON or YAML files, improving maintainability and understandability of the codes and files. * #25661 Refactor ContentType class: "TYPE" made final * #25661 Added a JsonProperty to ContentType class * #25661 Added JsonViews and JsonProperty to handle JSON serialization. This commit introduces JsonViews in AbstractLanguage, ContentType, and AbstractSiteView classes. This helps manage different JSON views and control serialization for different use cases. A JsonProperty "dotCMSObjectType" has been added to the ContentType class. Test cases for Content Type, Site and Language have been updated to include a command to push the changes back to the server, ensuring the structure is still correct. New functionalities for creating and updating language and content type have been provided with the ExternalView of Json, adding more security to the API calls. The CommonViews class has been added to handle different views for JSON serialization. This change enhances the control over data visibility in different scenarios. * #25661 Cleanup --------- Co-authored-by: Nollymar Longa <nollymar.longa@dotcms.com> * Update dot-block-editor.component.ts * Update dot-content-compare-block-editor.component.spec.ts * Update TestDataUtils.java * Update StoryBlockAPITest.java * Update FolderAPITest.java * Update ContentletIndexAPIImplTest.java --------- Co-authored-by: Jonathan Gamba <jonathan.gamba@dotcms.com> Co-authored-by: Nollymar Longa <nollymar.longa@dotcms.com>
fmontes
pushed a commit
that referenced
this pull request
Sep 11, 2023
…26025) * Jdcmsd char count fixes (#25780) * Issue 25661 add an attribute to each and every piece of json that conforms the cli bundle (#25731) * #25661 Add dotCMSObjectType field to language, content type and site models Added a "dotCMSObjectType" field to the language, content type, and site models in the project to get better clarity. Additionally, new tests have been added to LanguageCommandTest, ContentTypeCommandTest, and SiteCommandTest. These tests ensure that the "dotCMSObjectType" field is present in the JSON and YAML files generated when the pull command is executed for languages, content types, and sites respectively. This addition helps in identifying the object type when reviewing the JSON or YAML files, improving maintainability and understandability of the codes and files. * #25661 Refactor ContentType class: "TYPE" made final * #25661 Added a JsonProperty to ContentType class * #25661 Added JsonViews and JsonProperty to handle JSON serialization. This commit introduces JsonViews in AbstractLanguage, ContentType, and AbstractSiteView classes. This helps manage different JSON views and control serialization for different use cases. A JsonProperty "dotCMSObjectType" has been added to the ContentType class. Test cases for Content Type, Site and Language have been updated to include a command to push the changes back to the server, ensuring the structure is still correct. New functionalities for creating and updating language and content type have been provided with the ExternalView of Json, adding more security to the API calls. The CommonViews class has been added to handle different views for JSON serialization. This change enhances the control over data visibility in different scenarios. * #25661 Cleanup --------- Co-authored-by: Nollymar Longa <nollymar.longa@dotcms.com> * Update dot-block-editor.component.ts * Update dot-content-compare-block-editor.component.spec.ts * Update TestDataUtils.java * Update StoryBlockAPITest.java * Update FolderAPITest.java * Update ContentletIndexAPIImplTest.java --------- Co-authored-by: Jonathan Gamba <jonathan.gamba@dotcms.com> Co-authored-by: Nollymar Longa <nollymar.longa@dotcms.com> * dev (block editor): build --------- Co-authored-by: Jamie Mauro <102264829+jdcmsd@users.noreply.github.com> Co-authored-by: Jonathan Gamba <jonathan.gamba@dotcms.com> Co-authored-by: Nollymar Longa <nollymar.longa@dotcms.com> Co-authored-by: Jose Castro <jose.castro@dotcms.com>
manuelrojas
pushed a commit
that referenced
this pull request
Sep 12, 2023
…26025) * Jdcmsd char count fixes (#25780) * Issue 25661 add an attribute to each and every piece of json that conforms the cli bundle (#25731) * #25661 Add dotCMSObjectType field to language, content type and site models Added a "dotCMSObjectType" field to the language, content type, and site models in the project to get better clarity. Additionally, new tests have been added to LanguageCommandTest, ContentTypeCommandTest, and SiteCommandTest. These tests ensure that the "dotCMSObjectType" field is present in the JSON and YAML files generated when the pull command is executed for languages, content types, and sites respectively. This addition helps in identifying the object type when reviewing the JSON or YAML files, improving maintainability and understandability of the codes and files. * #25661 Refactor ContentType class: "TYPE" made final * #25661 Added a JsonProperty to ContentType class * #25661 Added JsonViews and JsonProperty to handle JSON serialization. This commit introduces JsonViews in AbstractLanguage, ContentType, and AbstractSiteView classes. This helps manage different JSON views and control serialization for different use cases. A JsonProperty "dotCMSObjectType" has been added to the ContentType class. Test cases for Content Type, Site and Language have been updated to include a command to push the changes back to the server, ensuring the structure is still correct. New functionalities for creating and updating language and content type have been provided with the ExternalView of Json, adding more security to the API calls. The CommonViews class has been added to handle different views for JSON serialization. This change enhances the control over data visibility in different scenarios. * #25661 Cleanup --------- Co-authored-by: Nollymar Longa <nollymar.longa@dotcms.com> * Update dot-block-editor.component.ts * Update dot-content-compare-block-editor.component.spec.ts * Update TestDataUtils.java * Update StoryBlockAPITest.java * Update FolderAPITest.java * Update ContentletIndexAPIImplTest.java --------- Co-authored-by: Jonathan Gamba <jonathan.gamba@dotcms.com> Co-authored-by: Nollymar Longa <nollymar.longa@dotcms.com> * dev (block editor): build --------- Co-authored-by: Jamie Mauro <102264829+jdcmsd@users.noreply.github.com> Co-authored-by: Jonathan Gamba <jonathan.gamba@dotcms.com> Co-authored-by: Nollymar Longa <nollymar.longa@dotcms.com> Co-authored-by: Jose Castro <jose.castro@dotcms.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#25661 This PR adds a
dotCMSObjectType
field to language, content type and site models to be able to easily identify them individually on their JSON/YAML representation.🤖 Generated by Copilot at 0e10160
Added
dotCMSObjectType
fields to content type, language, and site classes and interfaces to enable the dotCMS CLI tool to handle them as distinct objects. Added and modified test classes and methods to verify the functionality of the dotCMS CLI commands for pulling content types, languages, and sites.🤖 Generated by Copilot at 0e10160
dotCMSObjectType
field toContentType
,AbstractLanguage
, andAbstractSiteView
classes to identify the type of the object in JSON and YAML formats (link, link, link)ContentType
class and its subclasses with@JsonIgnoreProperties
,@JsonProperty
,@JsonSubTypes
, and@JsonTypeInfo
to customize JSON serialization and deserialization (link)Files
,SimpleFileVisitor
,BasicFileAttributes
, andUUID
classes inContentTypeCommandTest
,LanguageCommandTest
, andSiteCommandTest
(link, link, link, link)content-type pull
,language pull
, andsite pull
commands of dotCMS CLI tool by checking thedotCMSObjectType
field in JSON and YAML files inContentTypeCommandTest
,LanguageCommandTest
, andSiteCommandTest
(link, link, link)ContentTypeCommandTest
,LanguageCommandTest
, andSiteCommandTest
(link, link, link, link)