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

[24.1] Make all fields optional for HelpForumPost #18839

Merged

Conversation

davelopez
Copy link
Contributor

Fixes #18827

Unfortunately, the OpenAPI schema for the /search.json route in Discourse (https://docs.discourse.org/openapi.json) does not specify the proper type for the posts array in the response.

...
"properties": {
    "posts": {
        "type": "array",
        "items": {}
    },
    "users": {
        "type": "array",
        "items": {}
    },
    "categories": {
        "type": "array",
        "items": {}
    },
    "tags": {
        "type": "array",
        "items": {}
    },
    "groups": {
        "type": "array",
        "items": {}
    }
...

We can try to infer it from /posts.json but there, seem to be no required properties at all, which is also strange.

I made all the properties except for the id optional in case more cases like these exist.

How to test the changes?

(Select all options that apply)

  • 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.

Unfortunately, the OpenAPI schema of Discourse (https://docs.discourse.org/openapi.json) does not specify the proper type for posts in the "/search.json" response.

There is at least one case where the post name is null (https://help.galaxyproject.org//search.json?q=tags:circos+tool-help%20status:solved) so let's play safe.
Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

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

Thanks!

@github-actions github-actions bot added this to the 24.1 milestone Sep 17, 2024
@mvdbeek mvdbeek merged commit 5e42f10 into galaxyproject:release_24.1 Sep 18, 2024
49 of 52 checks passed
@davelopez davelopez deleted the 24.1_fix_help_form_post_schema branch September 18, 2024 07:25
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.

2 participants