Christoph Weitkamp
355c1345ea
[rest] Improve metadata query parameter description ( #2790 )
...
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-20 17:48:01 +01:00
Christoph Weitkamp
7997e2636a
Prevent errors in log when client closes the HTTP connection ( #2781 )
...
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-20 11:18:32 +01:00
Christoph Weitkamp
44da7a4e0e
Avoid URISyntaxException in tests ( #2770 )
...
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-15 17:33:59 +01:00
Wouter Born
ad936cd83f
Add more null annotations ( #2742 )
...
* Add more null annotations
* Fix mock name
Adds null annotations to most of the tests as well as a few other classes.
Also fixes a few other SAT findings.
Fixes ~300 SAT findings in total.
Signed-off-by: Wouter Born <github@maindrain.net>
2022-02-14 11:33:50 +01:00
J-N-K
e1962843d5
fix recursive membership throws StackOverflowException on REST API call ( #2736 )
...
Signed-off-by: Jan N. Klug <github@klug.nrw>
2022-02-06 21:19:36 +01:00
Christoph Weitkamp
b849dd144a
Fixed wrong openAPI schema for /inbox ( #2709 )
...
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-26 12:01:26 +01:00
Christoph Weitkamp
0dbc2b2ef4
[rest] Do not reuse FilterCriteria instance for more than one query ( #2668 )
...
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-15 17:07:25 +01:00
Christoph Weitkamp
cabb3f7315
Update license headers to 2022 ( #2671 )
...
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-07 13:16:42 +01:00
Wouter Born
0bdaeef789
[persistence] Use ZonedDateTime instead of Date in ModifiablePersistenceService interface ( #2660 )
...
If PRs are created to implement this interface, it would be better if we can prevent the propagation of old APIs like Date.
Related to:
* https://github.com/openhab/openhab-addons/pull/11922
* https://github.com/openhab/openhab-addons/pull/11923
* https://github.com/openhab/openhab-core/issues/2618#issuecomment-1003544762
Signed-off-by: Wouter Born <github@maindrain.net>
2022-01-02 20:45:10 +01:00
Christoph Weitkamp
adde43c311
Prevent errors in log when client closes the HTTP connection ( #2655 )
...
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-30 11:37:00 +01:00
Christoph Weitkamp
646640094a
Prevent errors in log when there is a connection timeout ( #2654 )
...
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-12-30 10:10:38 +01:00
Kai Kreuzer
e3b07782b4
pom reference update from http to https ( #2644 )
...
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-23 22:55:20 +01:00
Kai Kreuzer
1ebf7395d9
Apply spotless
...
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-12-20 06:59:22 +01:00
openhab-bot
5ac05c4968
[unleash-maven-plugin] Preparation for next development cycle.
2021-12-19 21:49:34 +00:00
Wouter Born
69043bea74
Use Accept-Language header for locale in ConfigurableServiceResource ( #2602 )
...
Most RESTResources already use the LocaleService to get the locale based on the Accept-Language header and use the system locale only as fallback.
Because the ConfigurableServiceResource does not do this, it results in mixed up languages whenever your browser locale is not the same as the configured system locale.
See:
* https://community.openhab.org/t/language-support-question-regional-settings-language-vs-browser-language/128010
* https://github.com/openhab/openhab-webui/issues/1083
Signed-off-by: Wouter Born <github@maindrain.net>
2021-12-10 23:33:13 +01:00
spacemanspiff2007
abb17c1658
[rest] Align item endpoint with items endpoint ( #2533 )
...
Add option to skip members, e.g. if the goal of the request to just get the metadata of a group item
Signed-off-by: spacemanspiff2007 <git@sgerber.de>
2021-11-02 08:25:18 +01:00
Wouter Born
bf81eaa1c2
Fix/suppress PMD CompareObjectsWithEquals findings ( #2548 )
...
Newer PMD versions discover more CompareObjectsWithEquals findings.
Related to https://github.com/openhab/static-code-analysis/pull/423
Signed-off-by: Wouter Born <github@maindrain.net>
2021-10-30 19:37:34 +02:00
Wouter Born
ba6386d83b
Use CoreItemFactory item type constants in tests ( #2497 )
...
This prevents typos and using the constants makes it easier to find out what other items types are accepted.
It also makes it easier to see that these values are item types and not labels or descriptions.
Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-27 07:34:58 +02:00
Wouter Born
641b92324d
Prevent NSEE when there is no AddonService ( #2493 )
...
The code was already prepared for a nullable default service and then returns a 404 not found.
Fixes #2491
Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-25 20:21:53 +02:00
Wouter Born
14bbbb6a92
Help OpenAPI to infer EnrichedThingDTO model channels type as a list of EnrichedChannelDTOs ( #2487 )
...
Fixes #2461
Signed-off-by: Wouter Born <github@maindrain.net>
2021-09-15 22:30:52 +02:00
Yannick Schaus
2663a3fc7e
Community Marketplace Add-on Service - initial contribution ( #2405 )
...
Signed-off-by: Yannick Schaus <github@schaus.net>
2021-09-14 09:04:04 +02:00
lolodomo
b128b2b4ec
[REST] Handle IP v6 in X-Forwarded-Host header ( #2470 )
...
Fix #2468
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-08-29 20:15:40 +02:00
lolodomo
57459ff306
[REST] Fix few content types ( #2469 )
...
Fix #2464
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-08-29 20:06:04 +02:00
Kai Kreuzer
5a667cc868
applied spotless
...
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-27 23:22:02 +02:00
jenkins
b8d2077805
[unleash-maven-plugin] Preparation for next development cycle.
2021-06-27 15:50:02 +00:00
Paul Vogel
1f2beea19e
[REST][Docs] Corrects the docs for security requirement for the ThingResource (in the openapi specification) ( #2404 )
...
* Add @SecurityRequirement annotation to ThingResource::getAll function
Signed-off-by: Paul Vogel <github@paulvogel.me>
2021-06-21 13:00:01 +02:00
Paul Vogel
5cc76378a0
Add @SecurityRequirement annotation to PersistenceResource::httpPutPersistenceItemData function ( #2406 )
...
Signed-off-by: Paul Vogel <github@paulvogel.me>
2021-06-21 12:59:24 +02:00
Kai Kreuzer
3cac330c5f
[rest] Fix links to group members in REST response ( #2399 )
...
* Fix links for to group members in REST response
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-06-08 21:41:51 +02:00
Christoph Weitkamp
585e870183
[config] Changed 'ConfigDescriptionParameterDTO' field serialization 'defaultValue' -> 'default' ( #2383 )
...
* Changed ConfigParameterDTO field serialization 'defaultValue' -> 'default'
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-30 18:27:35 +02:00
lolodomo
a3d5f3e8dc
[REST] inbox/approve: new response code 400 ( #2343 )
...
Related to openhab/openhab-webui#1035
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2021-05-17 21:13:40 +02:00
Wouter Born
7579aa4d31
Fix more SAT findings and add a few suppressions ( #2335 )
...
* Fix more SAT findings and add a few suppressions
Signed-off-by: Wouter Born <github@maindrain.net>
2021-05-05 20:59:59 +02:00
Christoph Weitkamp
31494c0d8a
Added i18n feature for ConfigurableServices ( #2333 )
...
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-05-05 01:19:23 +02:00
Christoph Weitkamp
e4f77f7992
[REST] Added editable flag for ItemChannelLinks by introducing an EnrichedItemChannelLinkDTO ( #2318 )
...
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2021-04-27 11:03:41 +02:00
Wouter Born
05b7ec86f1
Fix new SAT findings ( #2291 )
...
Signed-off-by: Wouter Born <github@maindrain.net>
2021-04-14 18:41:07 +02:00
Wouter Born
b64c84e8b9
Fix wrong/missing OpenAPI ApiResponse content ( #2258 )
...
This fixes some issues where the response content is missing or wrong in the generated OpenAPI spec.
Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-27 13:28:47 +01:00
Wouter Born
07b95ca668
Fix SAT findings ( #2256 )
...
Fixes 65 SAT findings.
Signed-off-by: Wouter Born <github@maindrain.net>
2021-03-25 20:18:08 +01:00
Kai Kreuzer
87211d2439
[REST] Prevent internal server error on invalid link requests on REST API ( #2179 )
...
Closes https://github.com/openhab/openhab-webui/issues/878
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-02-06 11:27:58 +01:00
Kai Kreuzer
4b8546b599
Prevent errors in log when client closes the HTTP connection ( #2049 )
...
Fixes openhab/openhab-distro#1188
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2021-01-02 09:04:05 +01:00
Wouter Born
774b9d607b
Update license headers to 2021 ( #2041 )
...
Signed-off-by: Wouter Born <github@maindrain.net>
2021-01-01 16:43:46 +01:00
Wouter Born
bf14e1077f
Apply Spotless, resolve itest runbundles for 3.1.0 ( #1982 )
...
Signed-off-by: Wouter Born <github@maindrain.net>
2020-12-22 10:01:42 +01:00
jenkins
965531696b
[unleash-maven-plugin] Preparation for next development cycle.
2020-12-20 22:24:39 +00:00
lolodomo
5bf3f2fd60
[inbox REST API] Fix approve API annotation ( #1933 )
...
Related to #1848
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2020-12-15 21:17:41 +01:00
Yannick Schaus
128e7bb3c8
Add firmwareStatus to things in summary mode ( #1932 )
...
The "summary" mode for `/rest/things` introduced in https://github.com/openhab/openhab-core/pull/1827
leads to these warnings in the console:
```
Field 'firmwareStatus' could not be eliminated: Can not set final org.openhab.core.thing.firmware.dto.FirmwareStatusDTO field org.openhab.core.io.rest.core.thing.EnrichedThingDTO.firmwareStatus to null value
```
The easiest solution to remove those warnings is to add it again to the list of fields included in the summaries.
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-12-15 08:07:11 +01:00
Christoph Hofmann
bbede78dc9
Added operationIds for OpenAPI specification ( #1861 )
...
Signed-off-by: Christoph Hofmann <christoph@hofmann.pm>
2020-12-10 23:12:11 +01:00
lolodomo
b40d10a978
[inbox REST API] Added new optional pareameter newThingId to approve ( #1848 )
...
Fix #1783
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2020-11-26 08:37:16 +01:00
Yannick Schaus
6ff65df7d2
[REST Auth] Remove user access to things ( #1807 )
...
I can't think of a good reason why listing things or querying their status should be allowed for users.
The things layer should only be of concern to admins IMHO.
As noted here: https://community.openhab.org/t/oh3-will-list-all-your-things-even-if-you-are-not-logged-in/108006/3
passwords and other sensible information in configuration could end up being exposed without auth required.
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-26 08:31:10 +01:00
Yannick Schaus
065177b730
[rest] Add summary option to rules, things, UI components resources ( #1827 )
...
The /things, /rules, /ui/components endpoints retrieve all objects
in their entirety, which can become very big, i.e. channels, config
parameters, script rule modules or trees of UI components can
quickly add up to the size.
When the UI simply displays a list of those objects it retrieves all
this extra information but does nothing with it.
This introduces an optional ?summary=true query parameter for the
above resources to limit the output to pre-defined fields which are
deemed most relevant for displaying these lists, omitting the rest.
When the option is not set, the behavior remains unchanged so this
change is not API breaking. The API version has therefore not been
incremented. The client is responsible for adding the option to
retrieve summarized collections instead of the entire objects.
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-11-21 18:40:48 +01:00
Kai Kreuzer
70ca7655a2
Harden item creation by checking for validity of name ( #1825 )
...
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-11-18 00:18:00 +01:00
silamon
d59d3c3cc2
[REST] Apply metadata selector regex on all namespaces ( #1756 )
...
* Change metadata selector
Fixes #1692
Signed-off-by: Simon Lamon <simonlamon93@hotmail.com>
2020-11-14 17:58:46 +01:00
Christoph Weitkamp
91e16e0f80
Print 'ItemChannelLink' configuration in output of console commands ( #1794 )
...
* Print ItemChannelLink configuration in output of console commands
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-11-05 09:22:01 +01:00