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

Improve typing for archived histories API schema #18586

Merged

Conversation

davelopez
Copy link
Contributor

@davelopez davelopez commented Jul 22, 2024

Part of #18532

Drop "Any" and use a partial model for custom keys. This will improve the client API schema types for archived histories and consolidate the serialization with the regular histories.

Before

responses: {
            /** @description Successful Response */
            200: {
                content: {
                    "application/json": unknown[];
                };
            };

After

responses: {
            /** @description Successful Response */
            200: {
                content: {
                    "application/json": (
                        | components["schemas"]["CustomArchivedHistoryView"]
                        | components["schemas"]["ArchivedHistoryDetailed"]
                        | components["schemas"]["ArchivedHistorySummary"]
                    )[];
                };
            };

How to test the changes?

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added this to the 24.2 milestone Jul 22, 2024
@davelopez davelopez marked this pull request as draft July 23, 2024 10:08
@davelopez davelopez force-pushed the improve_typing_archived_histories_api branch 2 times, most recently from 00479d6 to dd3830a Compare July 23, 2024 10:55
@davelopez davelopez marked this pull request as ready for review July 23, 2024 12:54
@davelopez
Copy link
Contributor Author

Test failures are unrelated

Drop Any and use partial model for custom keys.
Consolidate archived histories serialization with regular histories.
@davelopez davelopez force-pushed the improve_typing_archived_histories_api branch from dd3830a to 6f060d3 Compare July 30, 2024 09:24
@davelopez davelopez requested a review from a team July 30, 2024 10:44
Copy link
Member

@bgruening bgruening left a comment

Choose a reason for hiding this comment

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

Thanks a lot @davelopez for all those typing improvements!

@davelopez davelopez merged commit d7496f4 into galaxyproject:dev Aug 2, 2024
52 of 54 checks passed
@davelopez davelopez deleted the improve_typing_archived_histories_api branch August 2, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants