Skip to content
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.

Commit

Permalink
fix(Cite): Use PascalCase for enumeration variants
Browse files Browse the repository at this point in the history
This is more consitent with schema.org. e.g
https://schema.org/ItemAvailability
  • Loading branch information
nokome committed Mar 18, 2021
1 parent 8d262b7 commit fa9a413
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion py/stencila/schema/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Any, Dict, List as Array, Optional, Union
from enum import Enum

ECitationMode = Enum("CitationMode", ["parenthetical", "narrative", "narrative-author", "narrative-year", "normal", "suppressAuthor"])
ECitationMode = Enum("CitationMode", ["Parenthetical", "Narrative", "NarrativeAuthor", "NarrativeYear", "normal", "suppressAuthor"])

EItemListOrder = Enum("ItemListOrder", ["ascending", "descending", "unordered"])

Expand Down
2 changes: 1 addition & 1 deletion r/R/types.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Cite <- function(
)
self$type <- as_scalar("Cite")
self[["target"]] <- check_property("Cite", "target", TRUE, missing(target), "character", target)
self[["citationMode"]] <- check_property("Cite", "citationMode", FALSE, missing(citationMode), Enum("parenthetical", "narrative", "narrative-author", "narrative-year", "normal", "suppressAuthor"), citationMode)
self[["citationMode"]] <- check_property("Cite", "citationMode", FALSE, missing(citationMode), Enum("Parenthetical", "Narrative", "NarrativeAuthor", "NarrativeYear", "normal", "suppressAuthor"), citationMode)
self[["content"]] <- check_property("Cite", "content", FALSE, missing(content), Array(InlineContent), content)
self[["pageEnd"]] <- check_property("Cite", "pageEnd", FALSE, missing(pageEnd), Union("numeric", "character"), pageEnd)
self[["pageStart"]] <- check_property("Cite", "pageStart", FALSE, missing(pageStart), Union("numeric", "character"), pageStart)
Expand Down
8 changes: 4 additions & 4 deletions schema/Cite.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ properties:
description: Determines how the citation is shown within the surrounding text.
type: string
enum:
- parenthetical
- narrative
- narrative-author
- narrative-year
- Parenthetical
- Narrative
- NarrativeAuthor
- NarrativeYear
# Deprecated mode names: retained for backwards compatibility
# TODO: Remove in v2
- normal # == parenthetical
Expand Down

0 comments on commit fa9a413

Please sign in to comment.