-
Notifications
You must be signed in to change notification settings - Fork 931
Configuration Schema generator #1383
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
Changes from 19 commits
f6dc518
9f93f52
a9b4752
fc89713
b05c864
e6d61c1
cc5f8ec
807180e
65c185d
5844f0b
89412fb
642f9d6
f736d12
ee374a6
cb63174
3ed02d4
4f27f89
e2e185e
54de26d
90699ca
522cdd7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using Aspire.Azure.Storage.Blobs; | ||
| using Aspire; | ||
| using Azure.Storage.Blobs; | ||
|
|
||
| [assembly: ConfigurationSchema( | ||
| Types = [typeof(AzureStorageBlobsSettings), typeof(BlobClientOptions)], | ||
| ConfigurationPaths = ["Aspire:Azure:Storage:Blobs", "Aspire:Azure:Storage:Blobs:ClientOptions"], | ||
| ExclusionPaths = ["Aspire:Azure:Storage:Blobs:ClientOptions:Default"], | ||
| LogCategories = [ | ||
| "Azure", | ||
| "Azure.Core", | ||
| "Azure.Identity"])] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,75 +27,156 @@ | |
| "Blobs": { | ||
| "type": "object", | ||
| "properties": { | ||
| "ServiceUri": { | ||
| "type": "string", | ||
| "format": "uri", | ||
| "description": "Gets or sets the 'Uri' referencing the Blob service. This is likely to be similar to \"https://{account_name}.blob.core.windows.net\"" | ||
| }, | ||
| "HealthChecks": { | ||
| "type": "boolean", | ||
| "description": "Gets or sets a boolean value that indicates whether the Blob Storage health check is enabled or not.", | ||
| "default": true | ||
| }, | ||
| "Tracing": { | ||
| "type": "boolean", | ||
| "description": "Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is enabled or not.", | ||
| "default": false | ||
| }, | ||
| "ClientOptions": { | ||
| "type": "object", | ||
| "description": "Provides the client configuration options for connecting to Azure Blob Storage.", | ||
| "properties": { | ||
| "Diagnostics": { | ||
| "type": "object", | ||
| "properties": { | ||
| "ApplicationId": { | ||
| "type": "string", | ||
| "description": "Gets or sets the value sent as the first part of \u0022User-Agent\u0022 headers for all requests issues by this client. Defaults to P:Azure.Core.DiagnosticsOptions.DefaultApplicationId." | ||
| }, | ||
| "DefaultApplicationId": { | ||
| "type": "string", | ||
| "description": "Gets or sets the default application id. Default application id would be set on all instances." | ||
| }, | ||
| "IsDistributedTracingEnabled": { | ||
| "type": "boolean", | ||
| "description": "Gets or sets value indicating whether distributed tracing activities ( T:System.Diagnostics.Activity ) are going to be created for the clients methods calls and HTTP calls." | ||
| }, | ||
| "IsLoggingContentEnabled": { | ||
| "type": "boolean", | ||
| "description": "Gets or sets value indicating if request or response content should be logged." | ||
| }, | ||
| "IsLoggingEnabled": { | ||
| "type": "boolean", | ||
| "description": "Get or sets value indicating whether HTTP pipeline logging is enabled." | ||
| }, | ||
| "IsTelemetryEnabled": { | ||
| "type": "boolean", | ||
| "description": "Gets or sets value indicating whether the \u0022User-Agent\u0022 header containing P:Azure.Core.DiagnosticsOptions.ApplicationId , client library package name and version, P:System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription and P:System.Runtime.InteropServices.RuntimeInformation.OSDescription should be sent.\r\n The default value can be controlled process wide by setting AZURE_TELEMETRY_DISABLED to true , false , 1 or 0." | ||
| }, | ||
| "LoggedContentSizeLimit": { | ||
| "type": "integer", | ||
| "description": "Gets or sets value indicating maximum size of content to log in bytes. Defaults to 4096." | ||
| } | ||
| }, | ||
| "description": "Gets the client diagnostic options." | ||
| }, | ||
| "EnableTenantDiscovery": { | ||
| "type": "boolean", | ||
| "description": "Enables tenant discovery through the authorization challenge when the client is configured to use a TokenCredential. When enabled, the client will attempt an initial un-authorized request to prompt a challenge in order to discover the correct tenant for the resource." | ||
| "description": "Enables tenant discovery through the authorization challenge when the client is configured to use a TokenCredential.\r\n When enabled, the client will attempt an initial un-authorized request to prompt a challenge in order to discover the correct tenant for the resource." | ||
| }, | ||
| "EncryptionScope": { | ||
| "type": "string", | ||
| "description": "Gets the EncryptionScope to be used when making requests." | ||
| "description": "Gets the P:Azure.Storage.Blobs.BlobClientOptions.EncryptionScope to be used when making requests." | ||
| }, | ||
| "GeoRedundantSecondaryUri": { | ||
| "type": "string", | ||
| "format": "uri", | ||
| "description": "Gets or sets the secondary storage Uri that can be read from for the storage account if the account is enabled for RA-GRS." | ||
| "description": "Gets or sets the secondary storage T:System.Uri that can be read from for the storage account if the\r\n account is enabled for RA-GRS.\r\n \r\n If this property is set, the secondary Uri will be used for GET or HEAD requests during retries.\r\n If the status of the response from the secondary Uri is a 404, then subsequent retries for\r\n the request will not use the secondary Uri again, as this indicates that the resource\r\n may not have propagated there yet. Otherwise, subsequent retries will alternate back and forth\r\n between primary and secondary Uri." | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting, I'm curious, how does this render in the IDE, I suppose it actually shows the new lines as opposed to having the new line characters printed out?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }, | ||
| "Retry": { | ||
| "type": "object", | ||
| "description": "The set of options that can be specified to influence how retry attempts are made, and a failure is eligible to be retried", | ||
| "properties": { | ||
| "Delay": { | ||
| "type": "string", | ||
| "format": "duration", | ||
| "description": "The delay between retry attempts for a fixed approach or the delay on which to base calculations for a backoff-based approach. If the service provides a Retry-After response header, the next retry will be delayed by the duration specified by the header value." | ||
| "description": "The delay between retry attempts for a fixed approach or the delay\r\n on which to base calculations for a backoff-based approach.\r\n If the service provides a Retry-After response header, the next retry will be delayed by the duration specified by the header value." | ||
| }, | ||
| "MaxDelay": { | ||
| "type": "string", | ||
| "format": "duration", | ||
| "description": "The maximum permissible delay between retry attempts when the service does not provide a Retry-After response header. If the service provides a Retry-After response header, the next retry will be delayed by the duration specified by the header value." | ||
| "description": "The maximum permissible delay between retry attempts when the service does not provide a Retry-After response header.\r\n If the service provides a Retry-After response header, the next retry will be delayed by the duration specified by the header value." | ||
| }, | ||
| "MaxRetries": { | ||
| "type": "integer", | ||
| "description": "The maximum number of retry attempts before giving up." | ||
| }, | ||
| "Mode": { | ||
| "enum": [ "Fixed", "Exponential" ], | ||
| "enum": [ | ||
| "Fixed", | ||
| "Exponential" | ||
| ], | ||
| "description": "The approach to use for calculating retry delays." | ||
| }, | ||
| "NetworkTimeout": { | ||
| "type": "string", | ||
| "format": "duration", | ||
| "description": "The timeout applied to an individual network operations." | ||
| } | ||
| } | ||
| }, | ||
| "description": "Gets the client retry options." | ||
| }, | ||
| "TransferValidation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "Download": { | ||
| "type": "object", | ||
| "properties": { | ||
| "AutoValidateChecksum": { | ||
| "type": "boolean", | ||
| "description": "Defaults to true. False can only be specified on specific operations and not at the client level.\r\n Indicates whether the SDK should validate the content\r\n body against the content hash before returning contents to the caller.\r\n If set to false, caller is responsible for extracting the hash out\r\n of the T:Azure.Response\u00601 and validating the hash themselves." | ||
| }, | ||
| "ChecksumAlgorithm": { | ||
| "enum": [ | ||
| "Auto", | ||
| "None", | ||
| "MD5", | ||
| "StorageCrc64" | ||
| ], | ||
| "description": "Checksum algorithm to use." | ||
| } | ||
| }, | ||
| "description": "Options on download." | ||
| }, | ||
| "Upload": { | ||
| "type": "object", | ||
| "properties": { | ||
| "ChecksumAlgorithm": { | ||
| "enum": [ | ||
| "Auto", | ||
| "None", | ||
| "MD5", | ||
| "StorageCrc64" | ||
| ], | ||
| "description": "Checksum algorithm to use." | ||
| } | ||
| }, | ||
| "description": "Options on upload." | ||
| } | ||
| }, | ||
| "description": "Configures whether to send or receive checksum headers for blob uploads and downloads. Downloads\r\n can optionally validate that the content matches the checksum." | ||
| }, | ||
| "TrimBlobNameSlashes": { | ||
| "type": "boolean", | ||
| "description": "Whether to trim leading and trailing slashes on a blob name when using GetBlobClient(String) and similar methods.", | ||
| "default": true | ||
| "description": "Whether to trim leading and trailing slashes on a blob name when using M:Azure.Storage.Blobs.BlobContainerClient.GetBlobClient(System.String) and similar methods.\r\n Defaults to true for backwards compatibility." | ||
| } | ||
| } | ||
| }, | ||
| "description": "Provides the client configuration options for connecting to Azure Blob\r\n Storage." | ||
| }, | ||
| "ConnectionString": { | ||
| "type": "string", | ||
| "description": "Gets or sets the connection string used to connect to the blob service." | ||
| }, | ||
| "HealthChecks": { | ||
| "type": "boolean", | ||
| "description": "Gets or sets a boolean value that indicates whether the Blob Storage health check is enabled or not.", | ||
| "default": true | ||
| }, | ||
| "ServiceUri": { | ||
| "type": "string", | ||
| "format": "uri", | ||
| "description": "A T:System.Uri referencing the blob service.\r\n This is likely to be similar to \u0022https://{account_name}.blob.core.windows.net\u0022." | ||
| }, | ||
| "Tracing": { | ||
| "type": "boolean", | ||
| "description": "Gets or sets a boolean value that indicates whether the OpenTelemetry tracing is enabled or not.", | ||
| "default": true | ||
| } | ||
| } | ||
| }, | ||
| "description": "Provides the client configuration settings for connecting to Azure Blob Storage." | ||
| } | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using Aspire.MySqlConnector; | ||
| using Aspire; | ||
|
|
||
| [assembly: ConfigurationSchema( | ||
| Types = [typeof(MySqlConnectorSettings)], | ||
| ConfigurationPaths = ["Aspire:MySqlConnector"], | ||
| LogCategories = [ | ||
| "MySqlConnector", | ||
| "MySqlConnector.ConnectionPool", | ||
| "MySqlConnector.MySqlBulkCopy", | ||
| "MySqlConnector.MySqlCommand", | ||
| "MySqlConnector.MySqlConnection", | ||
| "MySqlConnector.MySqlDataSource"])] |

Uh oh!
There was an error while loading. Please reload this page.