Skip to content

[eg] fix record<unknown> #34100

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

[eg] fix record<unknown> #34100

wants to merge 3 commits into from

Conversation

l0lawrence
Copy link
Member

@l0lawrence l0lawrence commented Apr 21, 2025

We only want to swap Record to Record<{}> where additionalProperties is an object

Copy link

openapi-pipeline-app bot commented Apr 21, 2025

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ This PR targets either the main branch of the public specs repo or the RPSaaSMaster branch of the private specs repo. These branches are not intended for iterative development. Therefore, you must acknowledge you understand that after this PR is merged, the APIs are considered shipped to Azure customers. Any further attempts at in-place modifications to the APIs will be subject to Azure's versioning and breaking change policies. Additionally, for control plane APIs, you must acknowledge that you are following all the best practices documented by ARM at aka.ms/armapibestpractices. If you do intend to release the APIs to your customers by merging this PR, add the PublishToCustomers label to your PR in acknowledgement of the above. Otherwise, retarget this PR onto a feature branch, i.e. with prefix release- (see aka.ms/azsdk/api-versions#release--branches).
  • ❌ This PR has at least one breaking change (label: BreakingChangeReviewRequired).
    To unblock this PR, follow the process at aka.ms/brch.
  • ❌ The required check named TypeSpec Validation has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide

Copy link

openapi-pipeline-app bot commented Apr 21, 2025

PR validation pipeline restarted successfully. If there is ApiView generated, it will be updated in this comment.

@JoshLove-msft
Copy link
Member

Can we link to the issue?

Copy link

github-actions bot commented Apr 21, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

Language API Review for Package
Swagger Microsoft.ApiCenter
Go sdk/messaging/eventgrid/azsystemevents

@l0lawrence
Copy link
Member Author

fixes #34053

@@ -93,7 +93,8 @@ model DeviceConnectionStateEventProperties {
/** Schema of the Data property of an EventGridEvent for a device telemetry event (DeviceTelemetry). */
model DeviceTelemetryEventProperties {
/** The content of the message from the device. */
body: Record<{}>;
#suppress "@azure-tools/typespec-azure-core/bad-record-type" "The type of body is object"
body: Record<unknown>;
Copy link
Member

Choose a reason for hiding this comment

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

Is this based off the examples?

Copy link
Member Author

@l0lawrence l0lawrence Apr 23, 2025

Choose a reason for hiding this comment

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

so I based this on that the type in the swagger is just object without additionalProperties specified -- let me check the examples

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Hi, @@l0lawrence. Your PR has no update for 14 days and it is marked as stale PR. If no further update for over 14 days, the bot will close the PR. If you want to refresh the PR, please remove no-recent-activity label.

@microsoft-github-policy-service microsoft-github-policy-service bot added the no-recent-activity There has been no recent activity on this issue. label May 12, 2025
@@ -758,8 +757,7 @@ alias AcsChatThreadBaseEventData = {
createdByCommunicationIdentifier: CommunicationIdentifierModel;

/** The thread properties */
#suppress "@azure-tools/typespec-azure-core/bad-record-type" "The type of properties is object with additionalProperties: object"
properties: Record<unknown>;
properties: Record<{}>;
Copy link
Member

Choose a reason for hiding this comment

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

Apparently, these should be Record<Record<unknown>>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required data-plane Event Grid no-recent-activity There has been no recent activity on this issue. TypeSpec Authored with TypeSpec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants