Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSouther committed Oct 26, 2023
1 parent 4b74f1c commit 5badc4b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .tools/validation/schema/curated_sources_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ map(include('source'), key=regex('^[\da-z-]+$', name='source name'))
source:
name: str(upper_start=True, no_end_punc=True)
description: str(upper_start=True, end_punc=True)
url: regex('^(http).+', name="URL")
url: regex('^http.+', name="URL")
15 changes: 7 additions & 8 deletions .tools/validation/schema/example_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ map(include('example'), key=example_id())
---
# An example blocks all the languages together for a single example in a tab list. It is a navigable page on the code examples library. It is the top level "unit" of SoS content. This metadata is merged from tributaries with aws-doc-sdk-examples.
example:
# Human readable title, defaulting to slug-to-title of the ID if not provided. Overwritten by aws-doc-sdk-example when merging.
# Human readable title. TODO: Defaults to slug-to-title of the ID if not provided. Overwritten by aws-doc-sdk-example when merging.
title: str(upper_start=True, no_end_punc=True, required=False)
# Used in the TOC, defaults to slug-to-title of the ID if not provided. Overwritten by aws-doc-sdk-example when merging.
# Used in the TOC. TODO: Defaults to slug-to-title of the ID if not provided. Overwritten by aws-doc-sdk-example when merging.
title_abbrev: str(upper_start=True, no_end_punc=True, required=False)
# String label categories. Categories inferred by cross-service with multiple services, and can be whatever else it wants. Controls where in the TOC it appears. Overwritten by aws-doc-sdk-example when merging.
category: str(required=False, upper_start=True, no_end_punc=True, required=False)
# Link to additional topic places. Overwritten by aws-doc-sdk-example when merging.
guide_topic: include('guide_topic', required=False) # TODO Make this a list or a single.
# TODO how to add a language here and require it in sdks_schema. Keys merged by aws-doc-sdk-example when merging.
# TODO how to add a language here and require it in sdks_schema. TODO: Keys merged by aws-doc-sdk-example when merging.
languages: map(include('language'), key=enum('Bash', 'C++', 'CLI', 'Go', 'Java', 'JavaScript', 'Kotlin', '.NET', 'PHP', 'Python', 'Ruby', 'Rust', 'SAP ABAP', 'Swift'))
# TODO document. Not to be used by tributaries. Part of Cross Service.
service_main: service_name(required=False)
# TODO document. Not to be used by tributaries. Part of Cross Service.
# TODO document service_main and services. Not to be used by tributaries. Part of Cross Service.
# List of services used by the examples. Lines up with those in services.yaml. Overwritten by aws-doc-sdk-example when merging.
service_main: service_name(required=False)
services: map(map(key=str(), required=False), key=service_name())
synopsis: str(required=False, lower_start=True, end_punc_or_semicolon=True, required=False)
synopsis_list: list(str(upper_start=True, end_punc=True), required=False)
Expand All @@ -44,7 +43,7 @@ version:
add_services: map(key=service_name(), required=False)
# Deprecated. Replace with guide_topic list.
sdkguide: include('doc_url', required=False)
# Link to additional topic places. Overwritten by aws-doc-sdk-example when merging.
# Link to additional topic places. TODO: Overwritten by aws-doc-sdk-example when merging.
more_info: list(include('guide_topic', required=False))

# One language example can have several excerpts, each having a description block and one or more snippets.
Expand All @@ -56,5 +55,5 @@ excerpt:
# Tags embedded in source files to extract as snippets.
snippet_tags: list(str(), required=False)

service_slug_regex: regex('^[\da-z-]+$', name='service slug')
service_slug_regex: regex('^[\\da-z-]+$', name='service slug')
doc_url: regex('^(?!https://docs.aws.amazon.com/).+', name="relative documentation URL")
2 changes: 1 addition & 1 deletion .tools/validation/schema/example_strict_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ excerpt:
snippet_tags: list(str(), required=False)
snippet_files: list(str(), required=False)

service_slug_regex: regex('^[\da-z-]+$', name='service slug')
service_slug_regex: regex('^[\\da-z-]+$', name='service slug')
doc_url: regex('^(?!https://docs.aws.amazon.com/).+', name="relative documentation URL")
4 changes: 2 additions & 2 deletions .tools/validation/schema/sdks_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ title_override:
title_abbrev: str()

syntax_enum: enum('bash', 'cpp', 'go', 'java', 'javascript', 'kotlin', 'csharp', 'php', 'python', 'ruby', 'rust', 'sap-abap', 'sh', 'swift')
entity_regex: regex('^[&]([\dA-Za-z-_])+[;]$', name='valid entity')
entity_with_version_regex: regex('^[&]([\dA-Za-z-_])+;', name='valid entity with version')
entity_regex: regex('^[&]([\\dA-Za-z-_])+[;]$', name='valid entity')
entity_with_version_regex: regex('^[&]([\\dA-Za-z-_])+;', name='valid entity with version')
10 changes: 5 additions & 5 deletions .tools/validation/schema/services_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ service:
tags: map(key=enum('product_categories'))

chapter_override:
title: str(end_punc=False)
title_abbrev: str(end_punc=False)
title: str(end_punc=False)
title_abbrev: str(end_punc=False)

long_entity_regex: regex('^[&]([\dA-Za-z-_])+[;]( \(&([\dA-Za-z-_])+;\))?$', name='valid entity')
entity_regex: regex('^[&]([\dA-Za-z-_])+[;]$', name='valid entity')
doc_url: regex('^(?!https://docs.aws.amazon.com/).+', name="relative documentation URL")
long_entity_regex: regex('^&([\\dA-Za-z-_])+\;( \(&([\\dA-Za-z-_])+;\))?$', name='valid entity')
entity_regex: regex('^&([\\dA-Za-z-_])+\;$', name='valid entity')
doc_url: regex('^(?!https://docs.aws.amazon.com/).+', name="relative documentation URL")

0 comments on commit 5badc4b

Please sign in to comment.