Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust link schema and use in more places #1171

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions source/_patterns/00-atoms/components/breadcrumb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,8 @@ $schema: http://json-schema.org/draft-04/schema#
type: object
properties:
items:
type: array
properties:
name:
type: string
minLength: 1
url:
type: string
minLength: 1
required:
- name
- url
minItems: 1
allOf:
- $ref: ../../../non-pattern-schema/link.yaml
- minItems: 1
required:
- items
17 changes: 5 additions & 12 deletions source/_patterns/00-atoms/components/see-more-link.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
$schema: http://json-schema.org/draft-04/schema#
type: object
properties:
url:
type: string
minLength: 1
name:
type: string
minLength: 1
isInline:
type: boolean
required:
- url
- name
allOf:
- $ref: ../../../non-pattern-schema/link.yaml
- properties:
isInline:
type: boolean
12 changes: 1 addition & 11 deletions source/_patterns/01-molecules/components/archive-nav-link.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,7 @@ properties:
type: array
minItems: 1
items:
type: object
properties:
name:
type: string
minLength: 1
url:
type: string
minLength: 1
required:
- name
- url
$ref: ../../../non-pattern-schema/link.yaml
required:
- blockLink
dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,44 +31,14 @@ properties:
type: object
properties:
primary:
type: object
properties:
name:
type: string
minLength: 1
url:
type: string
minLength: 1
checkPMC:
type: string
minLength: 1
attributes:
type: array
items:
type: object
properties:
key:
type: string
minLength: 1
value:
type: string
required:
- key
required:
- name
- url
allOf:
- $ref: ../../../non-pattern-schema/link.yaml
- properties:
checkPMC:
type: string
minLength: 1
secondary:
type: object
properties:
name:
type: string
minLength: 1
url:
type: string
minLength: 1
required:
- name
- url
$ref: ../../../non-pattern-schema/link.yaml
required:
- primary
required:
Expand Down
12 changes: 12 additions & 0 deletions source/non-pattern-schema/link.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ properties:
url:
type: string
minLength: 1
attributes:
type: array
items:
type: object
properties:
key:
type: string
minLength: 1
value:
type: string
required:
- key
required:
- name
- url