Skip to content
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

Adding Content Item ApiController.cs endpoints documentation #15512

Merged
merged 36 commits into from May 6, 2024

Conversation

MarGraz
Copy link
Contributor

@MarGraz MarGraz commented Mar 14, 2024

As discussed here, I'm asking for your assistance @Piedone, to review the documentation section I have added about the Content Item API Controller.

Additionally, it would be good to include a link to the Swagger module developed by @hishamco. But I'm not sure if I can add a link to an unofficial swagger module.

Thank you

@MarGraz MarGraz requested a review from agriffard as a code owner March 14, 2024 12:22
@hishamco
Copy link
Member

Additionally, it would be good to include a link to the Swagger module developed by @hishamco. But I'm not sure if I can add a link to an unofficial swagger module.

It's a community project, I remember we mentioned many open-source libraries in the CREDITS section. so you can refer to it if no one has an objection

Copy link
Member

@Piedone Piedone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

src/docs/reference/modules/Contents/README.md Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Show resolved Hide resolved
@Piedone
Copy link
Member

Piedone commented Mar 18, 2024

When addressing review feedback, please adhere to the following:

  • Apply code suggestions directly so the reviewer doesn't have to eyeball the changes. These resolve themselves after applying them, that's fine.
  • Don't resolve other conversations so it's easier to track for the reviewer. Then, the reviewer will resolve them.
  • Feel free to mark conversations that you addressed to keep track of them with an emoji or otherwise, just don't resolve them.
  • Please keep conversations happening in line comment in those convos, otherwise communication will be a mess. If you have trouble finding them, see this video.
  • Please click "Re-request review" in the top-right corner for each reviewer when you're ready for another round of review, so they know that you're done.

@Piedone
Copy link
Member

Piedone commented Apr 10, 2024

Any news, @MarGraz?

@MarGraz
Copy link
Contributor Author

MarGraz commented Apr 15, 2024

@Piedone I will work on the changes during this week.

@Piedone
Copy link
Member

Piedone commented Apr 24, 2024

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Apr 24, 2024

Walkthrough

The recent documentation update provides an extensive overview of utilizing the OrchardCore.Contents module's ApiController.cs for content management in the Orchard Core Admin backoffice. It includes details on authentication using OAuth 2, enabling OpenId features, configuring user roles, and specifics on API endpoints for content operations.

Changes

File Path Change Summary
src/docs/reference/modules/Contents/README.md Detailed explanation added for ApiController.cs in OrchardCore.Contents module, covering authentication methods, feature activation like OpenId, role configuration, and API usage for content management.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

Out of diff range and nitpick comments (5)
src/docs/reference/modules/Contents/README.md (5)

Line range hint 1-1: Add a space after the period in the first sentence for better readability.


Line range hint 13-13: The description for CreatedUtc and Owner incorrectly states "The HTML content in the body." This should describe the actual purpose of these properties.

- | `CreatedUtc` | `DateTime` | The HTML content in the body. |
- | `Owner` | `string` | The HTML content in the body. |
+ | `CreatedUtc` | `DateTime` | The UTC timestamp when the content item was created. |
+ | `Owner` | `string` | The username of the content item owner. |

Line range hint 46-46: The abbreviation "id" should be capitalized to "ID" for consistency and to follow common conventions.

- ### Loading from a content item id
+ ### Loading from a content item ID

Line range hint 75-75: Consider using a hyphen in "well known" to form the compound adjective "well-known."

- The `console_log` liquid filter can be used to dump data from well known properties, or objects serializable to json, to the browser console.
+ The `console_log` liquid filter can be used to dump data from well-known properties, or objects serializable to json, to the browser console.

134-134: Ensure there is a space after the period in the sentence for better readability.

src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
@Piedone
Copy link
Member

Piedone commented Apr 24, 2024

These seem like sensible suggestions.

MarGraz and others added 2 commits April 25, 2024 09:16
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

Out of diff range and nitpick comments (1)
src/docs/reference/modules/Contents/README.md (1)

Line range hint 1-1: Add a space after the period to separate the sentences for better readability.

- # Contents (`OrchardCore.Contents`)  This module provides Content Management services.
+ # Contents (`OrchardCore.Contents`)  This module provides Content Management services.

src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
MarGraz and others added 2 commits April 25, 2024 09:23
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Out of diff range and nitpick comments (2)
src/docs/reference/modules/Contents/README.md (2)

Line range hint 1-1: Add a space after the period in the first sentence for better readability.


Line range hint 13-13: The description for CreatedUtc and Owner incorrectly states "The HTML content in the body." This should describe the actual purpose of these properties.

- | `CreatedUtc` | `DateTime` | The HTML content in the body. |
- | `Owner` | `string` | The HTML content in the body. |
+ | `CreatedUtc` | `DateTime` | The UTC timestamp when the content item was created. |
+ | `Owner` | `string` | The username of the content item owner. |

src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
MarGraz and others added 6 commits April 25, 2024 09:42
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Added suggested changes
Updated the API table descriptions
Updated a wrong info in the parameters table
Copy link
Member

@Piedone Piedone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apply code suggestions directly so the reviewer doesn't have to eyeball the changes. These resolve themselves after applying them, that's fine. Naturally though, don't resolve comments with code suggestions that you haven't actually applied.

But please don't resolve other conversations so it's easier to track for the reviewer. Then, the reviewer will resolve them.

src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
MarGraz and others added 12 commits May 2, 2024 09:54
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Co-authored-by: Zoltán Lehóczky <zoltan.lehoczky@lombiq.com>
Copy link
Contributor Author

@MarGraz MarGraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved all the comments, except one, asked what should I do here

src/docs/reference/modules/Contents/README.md Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
MarGraz

This comment was marked as duplicate.

Copy link
Contributor Author

@MarGraz MarGraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added minor changes

Copy link
Contributor Author

@MarGraz MarGraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Piedone all the changes are applied, tests are passed

src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
src/docs/reference/modules/Contents/README.md Outdated Show resolved Hide resolved
MarGraz and others added 2 commits May 6, 2024 14:08
Co-authored-by: Hisham Bin Ateya <hishamco_2007@yahoo.com>
Co-authored-by: Hisham Bin Ateya <hishamco_2007@yahoo.com>
Copy link
Member

@Piedone Piedone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Piedone Piedone merged commit 5a45ac5 into OrchardCMS:main May 6, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants