Skip to content

Align response schemas with source presenters#29

Merged
tommoor merged 3 commits into
mainfrom
claude/eloquent-feynman-FgFpC
May 30, 2026
Merged

Align response schemas with source presenters#29
tommoor merged 3 commits into
mainfrom
claude/eloquent-feynman-FgFpC

Conversation

@tommoor
Copy link
Copy Markdown
Member

@tommoor tommoor commented May 30, 2026

Summary

A reported validation error (Input should be a valid number [type=float_type, input_value='0', input_type=str]) traced back to the FileOperation.size field being documented as a number while the API actually serializes it as a stringsize is a BIGINT column, which Sequelize serializes as a string to avoid JavaScript safe-integer precision loss.

Since that class of mismatch could exist elsewhere, every response schema with a backing presenter was audited against the Outline source presenters and corrected so the documented output shape matches what the API actually returns.

Changes

Type correction (the original bug + its sibling)

  • FileOperation.size: numberstring (BIGINT). Also added the other presenter fields: format, name, error, collectionId, documentId, updatedAt; replaced the embedded collection object with collectionId.
  • Attachment.size: numberstring (BIGINT). Added userId; marked documentId nullable.

Fields that were documented but are not returned (removed)

  • Team.collaborativeEditing
  • Document.pinned
  • Comment.updatedBy
  • Star.documentUrl
  • GroupMembership.userId / user

Fields returned by presenters but missing (added)

  • User: color, timezone, updatedAt, deletedAt
  • Team: description, memberTeamCreate, passkeysEnabled, domain, preferences, guidanceMCP
  • Collection: url, commenting, templateManagement, sourceMetadata, data
  • Document: url, color, data, tasks; renamed emojiicon; replaced embedded collaborators with collaboratorIds
  • Comment: createdById, resolvedAt, resolvedBy, resolvedById, reactions
  • Revision: name, data, icon, color, collaborators, createdById, deletedAt
  • Share: sourceTitle, sourcePath, documentId, collectionId, urlId, domain, allowIndexing, showLastUpdated, showTOC, views
  • Star: updatedAt
  • Event: userId, changes
  • Group: description, externalId, disableMentions, externalGroup
  • OAuthClient: clientType, lastActiveAt
  • OAuthAuthentication: oauthClient, createdAt
  • Membership: documentId, createdById, sourceId, index
  • GroupMembership: documentId, collectionId, permission, sourceId
  • CollectionGroupMembership: documentId, sourceId
  • View: userId

Nullability corrections applied to fields the models declare as nullable across User, Collection, Document, Template, Share, Star, OAuthClient, Membership, GroupMembership, and CollectionGroupMembership.

Validation

  • spectral lint --fail-severity=error passes (no errors).
  • Operation-ID validation passes.
  • spec3.json regenerated from the YAML (same script the pre-commit hook runs).

claude added 3 commits May 30, 2026 12:08
The size field is backed by a BIGINT column which is serialized as a
string, causing numeric validation to fail on responses like '0'. Change
size to a string type.

Also align the FileOperation schema with the actual presenter output:
add format, name, error, collectionId, documentId, and updatedAt, and
replace the embedded collection object with collectionId.
Audited every schema with a backing presenter against the Outline source
and corrected the documented response shapes:

- Attachment: size is BIGINT (serialized as a string) — change number to
  string; add userId; mark documentId nullable.
- User: add color, timezone, updatedAt, deletedAt; mark lastActiveAt
  nullable.
- Team: remove collaborativeEditing (no longer returned); add description,
  memberTeamCreate, passkeysEnabled, domain, preferences, guidanceMCP.
- Collection: add url, commenting, templateManagement, sourceMetadata,
  data; mark description, index, color, icon nullable.
- Document: rename emoji to icon; replace embedded collaborators with
  collaboratorIds; remove pinned and dataAttributes (not returned); add
  url, color, data, tasks; mark collectionId, parentDocumentId, archivedAt
  nullable.
- Comment: remove updatedBy (not returned); add createdById, resolvedAt,
  resolvedBy, resolvedById, reactions.
- Revision: add name, data, icon, color, collaborators, createdById,
  deletedAt.
- Share: add sourceTitle, sourcePath, documentId, collectionId, urlId,
  domain, allowIndexing, showLastUpdated, showTOC, views; mark
  lastAccessedAt nullable.
- Star: remove documentUrl (not returned); add updatedAt; mark documentId
  and collectionId nullable.
- Event: add userId and changes.
- Group: add description, externalId, disableMentions, externalGroup.
- OAuthClient: add clientType and lastActiveAt; mark description,
  developerName, developerUrl, avatarUrl nullable.
- OAuthAuthentication: add oauthClient and createdAt.
- Membership: add documentId, createdById, sourceId, index; mark
  collectionId nullable.
- GroupMembership: remove userId and user (not returned); add documentId,
  collectionId, permission, sourceId.
- CollectionGroupMembership: add documentId and sourceId; mark
  collectionId nullable.
- Template: mark publishedAt nullable.
- View: add userId.
- Remove now-unused DocumentDataAttribute schema.
These are populated by a downstream repository and are part of the
document response, so they should remain documented.
@tommoor tommoor merged commit b474583 into main May 30, 2026
2 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.

2 participants