Skip to content

Commit

Permalink
fix(InlineContent): Remove Array and Object from InlineContent
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Jun 20, 2021
1 parent e955f27 commit a844439
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion python/stencila/schema/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4391,7 +4391,7 @@ class CitationIntentEnumeration(Enum):
"""
Union type for valid inline content.
"""
InlineContent = Union["AudioObject", "Cite", "CiteGroup", "CodeExpression", "CodeFragment", "Delete", "Emphasis", "ImageObject", "Link", "MathFragment", "NontextualAnnotation", "Note", "Quote", "Strong", "Subscript", "Superscript", "VideoObject", None, bool, int, float, Array["InlineContent"], Dict[str, Any], str]
InlineContent = Union["AudioObject", "Cite", "CiteGroup", "CodeExpression", "CodeFragment", "Delete", "Emphasis", "ImageObject", "Link", "MathFragment", "NontextualAnnotation", "Note", "Quote", "Strong", "Subscript", "Superscript", "VideoObject", None, bool, int, float, str]


"""
Expand Down
2 changes: 1 addition & 1 deletion r/R/types.R
Original file line number Diff line number Diff line change
Expand Up @@ -4484,7 +4484,7 @@ GrantTypes <- Union(Grant, MonetaryGrant)
#'
#' @return A `list` of class `Union` describing valid subtypes of this type
#' @export
InlineContent <- Union(AudioObject, Cite, CiteGroup, CodeExpression, CodeFragment, Delete, Emphasis, ImageObject, Link, MathFragment, NontextualAnnotation, Note, Quote, Strong, Subscript, Superscript, VideoObject, "NULL", "logical", "numeric", Array(InlineContent), "list", "character")
InlineContent <- Union(AudioObject, Cite, CiteGroup, CodeExpression, CodeFragment, Delete, Emphasis, ImageObject, Link, MathFragment, NontextualAnnotation, Note, Quote, Strong, Subscript, Superscript, VideoObject, "NULL", "logical", "numeric", "character")


#' All type schemas that are derived from Mark
Expand Down
4 changes: 1 addition & 3 deletions rust/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5364,8 +5364,6 @@ pub enum InlineContent {
Boolean(Boolean),
Integer(Integer),
Number(Number),
Vec<InlineContent>(Vec<InlineContent>),
Object(Object),
String(String),
}

Expand Down Expand Up @@ -5494,7 +5492,7 @@ pub enum Node {
Number(Number),
String(String),
Object(Object),
Vec<Node>(Vec<Node>),
Array(Vec<Node>),
}

/// All type schemas that are derived from Thing
Expand Down
4 changes: 0 additions & 4 deletions schema/InlineContent.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,4 @@ anyOf:
- type: boolean
- type: integer
- type: number
- type: array
items:
$ref: InlineContent
- type: object
- type: string
2 changes: 1 addition & 1 deletion ts/bindings/rust.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ export function unionSchemaToEnum(
) {
return ` ${type}(${type}Simple),\n`
}
let name = type === 'Vec<Node>' ? 'Array' : type
const name = type === 'Vec<Node>' ? 'Array' : type
return ` ${name}(${type}),\n`
})
.join('')
Expand Down
2 changes: 0 additions & 2 deletions ts/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2116,8 +2116,6 @@ export type InlineContent =
| null
| boolean
| number
| Array<InlineContent>
| Object
| string

/**
Expand Down

0 comments on commit a844439

Please sign in to comment.