Skip to content

Commit

Permalink
Add new services and sdks; make title/title_abbrev optional. (#21)
Browse files Browse the repository at this point in the history
* Add new services and sdks; make title/title_abbrev optional.
  • Loading branch information
cpyle0819 authored Apr 18, 2024
1 parent c6b5dc6 commit 57d7da2
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 20 deletions.
13 changes: 7 additions & 6 deletions aws_doc_sdk_examples_tools/config/sdks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,17 @@ PowerShell:
property: powershell
sdk:
4:
long: "&PowerShelllong;"
short: "&PowerShell;"
long: "&TWPALLlong;"
short: "&TWPALL;"
expanded:
long: "AWS Tools for PowerShell"
short: "AWS Tools for PowerShell"
short: "Tools for PowerShell"
guide: "powershell/latest/userguide/pstools-welcome.html"
api_ref:
uid: "ToolsForPowerShellV4"
name: "&guide-powershell-api;"
guide: "&guide-powershell-dev;"
uid: "ToolsForPowerShell4"
name: "&guide-twp-ref;"
link_template: "https://docs.aws.amazon.com/powershell/latest/reference"
guide: "&guide-twp-ug;"
Python:
property: python
sdk:
Expand Down
15 changes: 15 additions & 0 deletions aws_doc_sdk_examples_tools/config/services.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
accessanalyzer:
long: '&iam-citadel-long;'
short: '&iam-citadel;'
sort: IAM Access Analyzer
expanded:
long: AWS Identity and Access Management Access Analyzer
short: IAM Access Analyzer
blurb: helps you identify the resources in your organization and accounts, such as Amazon S3 buckets or IAM roles, shared with an external entity.
guide:
subtitle: User Guide
url: IAM/latest/UserGuide/what-is-access-analyzer.html
api_ref: access-analyzer/latest/APIReference/Welcome.html
tags:
product_categories: {'Security, Identity, & Compliance'}
version: accessanalyzer-2019-11-01
acm:
long: '&ACMlong; (&ACM;)'
short: '&ACM;'
Expand Down
8 changes: 4 additions & 4 deletions aws_doc_sdk_examples_tools/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ class Example:
id: str
file: str
# Human readable title. TODO: Defaults to slug-to-title of the ID if not provided.
title: str
title: Optional[str]
# Used in the TOC. TODO: Defaults to slug-to-title of the ID if not provided.
title_abbrev: str
title_abbrev: Optional[str]
synopsis: str
languages: Dict[str, Language]
# 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.
Expand Down Expand Up @@ -262,8 +262,8 @@ def from_yaml(
) -> tuple[Example, MetadataErrors]:
errors = MetadataErrors()

title = get_with_valid_entities("title", yaml, errors)
title_abbrev = get_with_valid_entities("title_abbrev", yaml, errors)
title = get_with_valid_entities("title", yaml, errors, True)
title_abbrev = get_with_valid_entities("title_abbrev", yaml, errors, True)
synopsis = get_with_valid_entities("synopsis", yaml, errors, opt=True)
synopsis_list = [str(syn) for syn in yaml.get("synopsis_list", [])]

Expand Down
10 changes: 0 additions & 10 deletions aws_doc_sdk_examples_tools/metadata_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,16 +331,6 @@ def test_verify_load_successful():
(
"empty_metadata.yaml",
[
metadata_errors.MissingField(
field="title",
file="empty_metadata.yaml",
id="sns_EmptyExample",
),
metadata_errors.MissingField(
field="title_abbrev",
file="empty_metadata.yaml",
id="sns_EmptyExample",
),
metadata_errors.MissingField(
field="languages",
file="empty_metadata.yaml",
Expand Down

0 comments on commit 57d7da2

Please sign in to comment.