Add Moderation API and stable response types#4
Merged
Conversation
Regenerated the cpp-restsdk client and markdown docs from the updated OpenAPI spec (mirrors fastcomments-sdk@4.0.0). - New Moderation API: 43 moderator-dashboard endpoints (ModerationApi class), covering comment moderation (list/count/ids/search/logs/export), moderation actions (remove/restore, flag/un-flag, review/spam/approval status, set text, votes, reopen/close thread), bans (ban/undo, pre-ban + bulk summaries, ban status/preferences, banned-user counts), badges & trust (award/remove badge, manual badges, get/set trust factor, user internal profile). All accept an sso query param. - BREAKING: response types are now the real success type. Previously every endpoint returned an X | APIError union that produced arbitrary wrapper types (e.g. *_200_response). Now each operation returns its success type directly and APIError is a default error response. Shapes are unchanged.
Switch update.sh from the local custom generator jar to the released @openapitools/openapi-generator-cli, which fixes nested map types (e.g. translationOverridesByLocale now generates as std::map<string, std::map<string, string>> instead of std::map<string, std::map>).
…nApi) The released cpp-restsdk generator silently drops operations whose response types it can't model (all 43 ModerationApi methods + 11 PublicApi methods), producing an incomplete SDK that doesn't match the README. Use the FastComments generator build (which has the nested-map fix and generates the full API) via update.sh.
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
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.
Moderation API
Adds a Moderation API with methods for the moderator dashboard:
All Moderation methods accept an
ssoparameter for SSO-authenticated moderators.Response types (breaking)
Each method now returns its success response type directly, with errors surfaced as a default error response, instead of the previous combined success-or-error return type. The response type names are now stable. Response shapes are unchanged.
Recommend a major version bump.