Repository navigation
Conversation
thingsboard/thingsboard#16561 documents limit of getTimeseriesHistory as an int32 integer. List it in legacyStringParams so the regenerated client keeps deprecated String overloads, and call them from ClientCompatibilityTest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #86. thingsboard/thingsboard#16561 also documents
limitofgetTimeseriesHistoryas anint32integer (4.4.0 took it asString). This adds it tolegacyStringParamsinopenapi/client-compat.json, so once the client is regenerated from the updated specs, PE and PaaS keep deprecated overloads that convert and delegate:GetTimeseriesHistoryArgs.Builder limit(String);getTimeseriesHistory(..., String limit, ...);getTimeseriesHistoryWithHttpInfo(..., String limit, ..., Map<String, String> headers).With the current specs
limitis still a string, so it is counted as pending:Client compat (pe): AlarmInfo -> Alarm; 29/29 operations, 0/57 params marked, 57 pending (still string).ClientCompatibilityTest(PE, PaaS) gets 4.4.0-style calls withlimit("100")and"100"as the positional argument.Source-incompatible change that remains after #16561:
limitis optional, so a barenullfor it (limit(null),getTimeseriesHistory(..., null, ...)in thelimitposition) becomes ambiguous between theStringandIntegeroverloads. A cast ((Integer) null) or leavinglimitout of the builder resolves it.GetTimeseriesHistoryArgs.limit()returnsIntegerinstead ofString.Testing
./generate-client.sh allwith the current specs: no changes to generated sources.mvn clean install(JDK 17) passes;ClientCompatibilityTest5/5 in PE and PaaS.limitchanged tointeger/int32in copies of the PE and PaaS specs:1/57 params marked, 56 pending; the generated client has the deprecatedString limitoverloads, compiles,ClientCompatibilityTestpasses, andGetTimeseriesHistoryArgs.builder()...limit("100").build().limit()returnsInteger100.