-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documented example schema for SOS guide
- Loading branch information
1 parent
a8606e2
commit 68f73b7
Showing
3 changed files
with
74 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Yamale Schema for example metadata, which is all .yaml files in the metadata folder | ||
# with a _metadata.yaml suffix. | ||
|
||
map(include('example'), key=example_id()) | ||
--- | ||
example: | ||
title: str(upper_start=True, no_end_punc=True) | ||
title_abbrev: str(upper_start=True, no_end_punc=True) | ||
synopsis: str(required=False, lower_start=True, end_punc_or_semicolon=True) | ||
synopsis_list: list(str(upper_start=True, end_punc=True), required=False) | ||
category: str(required=False, upper_start=True, no_end_punc=True) | ||
guide_topic: include('guide_topic', required=False) | ||
languages: map(include('language'), key=enum('Bash', 'C++', 'CLI', 'Go', 'Java', 'JavaScript', 'Kotlin', '.NET', 'PHP', 'Python', 'Ruby', 'Rust', 'SAP ABAP', 'Swift')) | ||
service_main: service_name(required=False) | ||
services: map(map(key=str(), required=False), key=service_name()) | ||
|
||
guide_topic: | ||
title: str(upper_start=True, no_end_punc=True) | ||
url: include('doc_url', required=False) | ||
|
||
language: | ||
versions: list(include('version')) | ||
|
||
# Per-language excerpts for the example. Languages and SDK versions are defined in .doc_gen/metadata/sdk_metadata.yaml | ||
version: | ||
sdk_version: int(min=1) | ||
github: regex('^(?!http).+', name="relative URL", required=False) | ||
sdkguide: include('doc_url', required=False) | ||
excerpts: list(include('excerpt'), required=False) | ||
block_content: block_content(required=False) | ||
add_services: map(key=service_name(), required=False) | ||
|
||
# The references to code content that will be included in the example's content. | ||
excerpt: | ||
description: str(required=False, upper_start=True, end_punc=True) | ||
snippet_tags: list(str(), required=False) | ||
snippet_files: list(str(), required=False) | ||
|
||
service_slug_regex: regex('^[\da-z-]+$', name='service slug') | ||
doc_url: regex('^(?!https://docs.aws.amazon.com/).+', name="relative documentation URL") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters