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

Fix diagnostic log return types #218

Merged
merged 2 commits into from
Feb 13, 2023
Merged

Fix diagnostic log return types #218

merged 2 commits into from
Feb 13, 2023

Conversation

mkj-is
Copy link
Contributor

@mkj-is mkj-is commented Jan 11, 2023

Perf power metrics and one diagnostic requests return Data instead of Codable models. Codable models are generated, but the body type schema is not used correctly. This is due to some Apple-specific content-types which are specified in the OpenAPI spec. Hopefully, CreateAPI provides configuration to override such body types.

Also fixes following warnings in the make generate step.

WARNING: Unknown body content types: [OpenAPIKitCore.OpenAPI.ContentType(underlyingType: OpenAPIKitCore.OpenAPI.ContentType.Builtin.other("application/vnd.apple.xcode-metrics+json"), warnings: [], parameters: [:])], defaulting to Data. Use paths.overridenBodyTypes to add support for your content types.
WARNING: Unknown body content types: [OpenAPIKitCore.OpenAPI.ContentType(underlyingType: OpenAPIKitCore.OpenAPI.ContentType.Builtin.other("application/vnd.apple.xcode-metrics+json"), warnings: [], parameters: [:])], defaulting to Data. Use paths.overridenBodyTypes to add support for your content types.
WARNING: Unknown body content types: [OpenAPIKitCore.OpenAPI.ContentType(underlyingType: OpenAPIKitCore.OpenAPI.ContentType.Builtin.other("application/vnd.apple.diagnostic-logs+json"), warnings: [], parameters: [:])], defaulting to Data. Use paths.overridenBodyTypes to add support for your content types.

There is a typo in the overridenBodyTypes configuration key in version 0.5.0 of CreateAPI (fixed in 1.0.0). I recommend updating it.

@mkj-is mkj-is requested a review from AvdLee as a code owner January 11, 2023 16:43
@SwiftLeeBot
Copy link
Collaborator

Fails
🚫

danger-swift failed.

Log

/var/folders/11/nh0v1jld7zd7b9zqm1774gtm0000gn/T/_tmp_dangerfile.swift:1:8: error: no such module 'Danger'
import Danger
       ^
�[31mERROR: Dangerfile eval failed at Dangerfile.swift
�[0;0m�[31mERROR: Could not get the results JSON file at /var/folders/11/nh0v1jld7zd7b9zqm1774gtm0000gn/T/danger-response.json
�[0;0m

Generated by 🚫 dangerJS against 0a4bf24

@mkj-is
Copy link
Contributor Author

mkj-is commented Jan 12, 2023

Running fastlane test locally succeeded for me. I see all recent Bitrise builds failed, looks unrelated to this PR.

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Feb 12, 2023
@mkj-is
Copy link
Contributor Author

mkj-is commented Feb 12, 2023

@AvdLee Can you have a look at this PR? It was marked stale, because there was no answer. There is a failure on CI, but it looks unrelated to changes in this PR. Locally tests are passing.

@github-actions github-actions bot removed the Stale label Feb 13, 2023
Copy link
Owner

@AvdLee AvdLee left a comment

Choose a reason for hiding this comment

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

Sorry, I missed this! Thanks for running the tests locally. I'll have to check out CI in a separate PR.

@AvdLee AvdLee merged commit effe28b into AvdLee:master Feb 13, 2023
@mkj-is mkj-is deleted the fix/diagnostic-logs-type branch February 13, 2023 09:08
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.

3 participants