Skip to content

[REST] Fix API to get file format when applied to a subset of elements #4786

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

Merged

Conversation

lolodomo
Copy link
Contributor

@lolodomo lolodomo commented May 3, 2025

Fix #4778

Things and items are now sorted in output only when all elements are requested. If the API is requested only for a subset of elements (things or items), the output respects the input order of elements.

DSL generator for things and items is also fixed to avoid a crash when called with 0 element.

@lolodomo lolodomo requested a review from a team as a code owner May 3, 2025 06:07
Copy link
Member

@holgerfriedrich holgerfriedrich left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@jimtng
Copy link
Contributor

jimtng commented May 4, 2025

Is this linked to the correct issue?

I think you probably meant #4778?

@jimtng
Copy link
Contributor

jimtng commented May 4, 2025

Thanks @lolodomo this indeed fixed the problem reported in #4778

Fix openhab#4778

Things and items are now sorted in output only when all elements are requested.
If the API is requested only for a subset of elements (things or items), the output respects the input order of elements.

DSL generator for things and items is also fixed to avoid a crash when called with 0 element.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@lolodomo lolodomo force-pushed the dsl_generator_without_object branch from f29e701 to af02b23 Compare May 4, 2025 06:35
@lolodomo
Copy link
Contributor Author

lolodomo commented May 4, 2025

I just fixed the number of the referenced issue.

@lolodomo
Copy link
Contributor Author

lolodomo commented May 6, 2025

@holgerfriedrich : please merge.

@holgerfriedrich holgerfriedrich merged commit 8d3c357 into openhab:main May 6, 2025
4 checks passed
@holgerfriedrich holgerfriedrich added the bug An unexpected problem or unintended behavior of the Core label May 6, 2025
@holgerfriedrich holgerfriedrich added this to the 5.0 milestone May 6, 2025
@lolodomo lolodomo deleted the dsl_generator_without_object branch May 6, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FileFormat Exporter error when Thing has a Bridge
3 participants