Class ExampleMetadataProvider
java.lang.Object
software.amazon.awssdk.codegen.internal.ExampleMetadataProvider
Class for loading and caching code example metadata from JSON files.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionExampleMetadataProvider(String exampleMetaPath) Creates an ExampleMetadataProvider instance for the given JSON file path. -
Method Summary
Modifier and TypeMethodDescriptioncreateLinkToCodeExample(Metadata metadata, String operationName) Creates a link to a code example for the given operation.getServiceCodeExamples(Metadata metadata) Gets all code examples for a specific service.
-
Constructor Details
-
ExampleMetadataProvider
Creates an ExampleMetadataProvider instance for the given JSON file path.- Parameters:
exampleMetaPath- path to the example metadata JSON file
-
-
Method Details
-
createLinkToCodeExample
Creates a link to a code example for the given operation.- Parameters:
metadata- the service metadataoperationName- the name of the operation to find an example for- Returns:
- Optional containing the HTML link to the code example, or empty if no example found
-
getServiceCodeExamples
Gets all code examples for a specific service.- Parameters:
metadata- the service metadata- Returns:
- a list of examples for the service
-