Skip to content

feat: use RfcAuthor for red API#10014

Merged
jennifer-richards merged 3 commits intoietf-tools:feat/rpc-apifrom
jennifer-richards:red-rfcauthors
Nov 27, 2025
Merged

feat: use RfcAuthor for red API#10014
jennifer-richards merged 3 commits intoietf-tools:feat/rpc-apifrom
jennifer-richards:red-rfcauthors

Conversation

@jennifer-richards
Copy link
Copy Markdown
Member

@jennifer-richards jennifer-richards commented Nov 27, 2025

Changes the RfcAuthor schema to match the RfcAuthor model and returns data from doc.rfcauthor_set if that is not empty. Otherwise, it uses doc.documentauthor_set data. The same serialized schema is used regardless of the data source.

The new schema is below. Note that titlepage_name is the only guaranteed non-empty field. This is the only name field included - the old name field has been dropped. A new datatracker_person_path field is added. This is the URL path for the author's "person page", relative to datatracker's root. If this is empty, no link should be rendered.

When representing a DocumentAuthor:

  • titlepage_name will be person.plain_name() (same value as the name field prior to this refactor)
  • is_editor is always False
  • person is always non-null
    RfcAuthor:
      type: object
      description: Serializer for a DocumentAuthor in a response
      properties:
        titlepage_name:
          type: string
          maxLength: 128
        is_editor:
          type: boolean
        person:
          type: integer
          nullable: true
        email:
          type: string
          format: email
        affiliation:
          type: string
          description: Organization/company used by author for submission
          maxLength: 100
        country:
          type: string
          description: Country used by author for submission
          maxLength: 255
        datatracker_person_path:
          type: string
          format: uri
          description: URL for person link (relative to datatracker base URL)
      required:
      - titlepage_name

Copy link
Copy Markdown
Contributor

@holloway holloway left a comment

Choose a reason for hiding this comment

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

Looks good, assuming that get_absolute_url does return a path and not a full url

@jennifer-richards
Copy link
Copy Markdown
Member Author

Looks good, assuming that get_absolute_url does return a path and not a full url

Yes, it returns only the path. I don't know why it's named that way but it's Django's convention. (We supply the method so it won't change on us.)

@jennifer-richards jennifer-richards merged commit 9fce327 into ietf-tools:feat/rpc-api Nov 27, 2025
2 checks passed
@jennifer-richards jennifer-richards deleted the red-rfcauthors branch November 27, 2025 03:56
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants