Skip to content
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

Chore: Fix SR data models validation #1551

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ extension SRTextWireframe: MutableWireframe {
}
}

extension SRImageWireframe: Hashable {
extension SRImageWireframe {
static func == (lhs: SRImageWireframe, rhs: SRImageWireframe) -> Bool {
return lhs.id == rhs.id
&& lhs.resourceId == rhs.resourceId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ internal struct SRTextWireframe: Codable, Hashable {
}

/// Schema of all properties of a ImageWireframe.
internal struct SRImageWireframe: Codable {
internal struct SRImageWireframe: Codable, Hashable {
/// base64 representation of the image. Not required as the ImageWireframe can be initialised without any base64
internal var base64: String?

Expand Down Expand Up @@ -1152,6 +1152,5 @@ internal enum SRRecord: Codable {
throw DecodingError.typeMismatch(SRRecord.self, error)
}
}

// Generated from https://github.com/DataDog/rum-events-format/tree/5a79d9a36b6e76493420792055fc50aed780569b
#endif
// Generated from https://github.com/DataDog/rum-events-format/tree/5a79d9a36b6e76493420792055fc50aed780569b
8 changes: 8 additions & 0 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ workflows:
#!/usr/bin/env zsh
set -e
make rum-models-verify ci=${CI}
- script:
title: Verify SR data models
run_if: '{{enveq "DD_RUN_SR_UNIT_TESTS" "1"}}'
inputs:
- content: |-
#!/usr/bin/env zsh
set -e
make sr-models-verify ci=${CI}
- xcode-test:
title: Run unit tests for Datadog - iOS Simulator
run_if: '{{enveq "DD_RUN_UNIT_TESTS" "1"}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ internal func generateSRSwiftModels(from schema: URL) throws -> String {
* Copyright 2019-Present Datadog, Inc.
*/

#if os(iOS)
import DatadogInternal

// This file was generated from JSON Schema. Do not modify it directly.

internal protocol SRDataModel: Codable {}

""",
footer: ""
footer: """
#endif
"""
)
let printer = SwiftPrinter(
configuration: .init(
Expand Down