Skip to content

Adding base urls for Api's to App Configuration#70

Merged
willvelida merged 2 commits intomainfrom
feature/apis/add_base_url_to_config
Jul 12, 2025
Merged

Adding base urls for Api's to App Configuration#70
willvelida merged 2 commits intomainfrom
feature/apis/add_base_url_to_config

Conversation

@willvelida
Copy link
Owner

This pull request introduces configuration updates across multiple APIs (activity-api, sleep-api, and weight-api) to define endpoint settings in Azure App Configuration. These changes ensure each API has a dedicated key-value entry for its base URL, enhancing manageability and consistency.

Configuration Updates for API Endpoints:

  • Activity API:

    • Added a variable activityApiEndpointConfigName to define the key name for the API's base URL in Azure App Configuration. (infra/apps/activity-api/main.bicep, infra/apps/activity-api/main.bicepR48)
    • Created a new resource activityApiEndpointSetting in Azure App Configuration to store the base URL for the Activity API (${apim.properties.gatewayUrl}/activity). (infra/apps/activity-api/main.bicep, infra/apps/activity-api/main.bicepR179-R187)
  • Sleep API:

    • Added a variable sleepApiEndpointConfigName to define the key name for the API's base URL in Azure App Configuration. (infra/apps/sleep-api/main.bicep, infra/apps/sleep-api/main.bicepR48)
    • Created a new resource sleepApiEndpointSetting in Azure App Configuration to store the base URL for the Sleep API (${apim.properties.gatewayUrl}/sleep). (infra/apps/sleep-api/main.bicep, infra/apps/sleep-api/main.bicepR179-R186)
  • Weight API:

    • Added a variable weightApiEndpointConfigName to define the key name for the API's base URL in Azure App Configuration. (infra/apps/weight-api/main.bicep, infra/apps/weight-api/main.bicepR48)
    • Created a new resource weightApiEndpointSetting in Azure App Configuration to store the base URL for the Weight API (${apim.properties.gatewayUrl}/weight). (infra/apps/weight-api/main.bicep, infra/apps/weight-api/main.bicepR177-R184)

Signed-off-by: Will Velida <willvelida@hotmail.co.uk>
@willvelida willvelida requested a review from Copilot July 12, 2025 09:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds dedicated App Configuration entries for the base URLs of the Activity, Sleep, and Weight APIs, improving endpoint manageability.

  • Introduce a Bicep variable for each API's configuration key name.
  • Create a new Microsoft.AppConfiguration/configurationStores/keyValues resource to store each API’s gateway URL.
  • Consistently reference ${apim.properties.gatewayUrl}/<api> for each endpoint.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
infra/apps/activity-api/main.bicep Added activityApiEndpointConfigName variable and key-value resource for Activity API base URL
infra/apps/sleep-api/main.bicep Added sleepApiEndpointConfigName variable and key-value resource for Sleep API base URL
infra/apps/weight-api/main.bicep Added weightApiEndpointConfigName variable and key-value resource for Weight API base URL
Comments suppressed due to low confidence (1)

}
}

resource weightApiEndpointSetting 'Microsoft.AppConfiguration/configurationStores/keyValues@2025-02-01-preview' = {
Copy link

Copilot AI Jul 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider specifying the contentType property (e.g., 'text/plain') for App Configuration key-values to make the data type explicit and improve downstream parsing.

Copilot uses AI. Check for mistakes.
Signed-off-by: Will Velida <willvelida@hotmail.co.uk>
@willvelida willvelida merged commit bebbfe4 into main Jul 12, 2025
25 checks passed
@willvelida willvelida deleted the feature/apis/add_base_url_to_config branch July 12, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants