forked from linkedin/rest.li
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGELOG
2217 lines (1813 loc) · 78.6 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1.8.7
-----
(RB=146100)
Performance optimization for construction of query params to avoid
needlessly appending the array index as a string for each field in
a list only to remove it later.
(RB=146833)
Deprecate AbstractValidator default (no-arg) constructor. See class
comments for context.
(RB=146839)
Potential fix for Avro Schema Translator transient problem where
some embedded/contained schemas are not being translated.
1.8.6
-----
(RB=139285)
Fix up RestLiServiceException.toString() and update ErrorResponse
schema to correctly reflect optional fields.
(RB=141420)
Add ColoVariants to D2Config
1.8.5
-----
(RB=138254)
Add pdsc file and validator for EmptyRecord.
(RB=138178)
Workaround bug in ScheduledThreadPoolExecutor that caused
delays when calling HttpClientFactory.shutdown().
(RB=139799)
Order subresources when restspec.json is exported. This avoids massive changes in restspec.json when
resources are added or removed. (This is due to internal use of HashMap.)
(RB=140005)
add ClientBuilderUtil.addSuffixToBaseName.
(RB=140198)
Fix bug in translating null value in a union with null when translating from Avro data to Pegasus.
(RB=140010)
Performance tuning for requests with large numbers of query params.
(RB=140733)
Modified LoadBalancerStrategy to use error rate for load balancing
1.8.4
-----
(RB=137488)
Fix to PSON deserialization issues.
PSON responses should not deserialize correctly.
The default representation for PSON strings is now a length-encoded string.
All length encoded strings are now encoded with a two byte length by default. This is a backwards-
incompatible change.
(RB=136944)
Allow Content-Types to include an optional Charset. For now it is ignored, but including it will
no longer allow either the client or the server to be unable to parse the Content-Type.
1.8.3
-----
(RB=135225)
Fix UnsupportedOperationException from UnmodifiableMap in SimpleLoadBalancerState.
1.8.2
------
(RB=131451)
Add PatchTreeRecorder & PatchRequestRecorder to build patches that allow you to remove fields.
(RB=130545)
Allow clients to send request bodies in pson format. Upgraded servers will be
able to interpet bodies in pson format.
(RB=133781)
Remove legacy server code that uses ',' as separator for batch_get ids. Correct format is "?ids=1&ids=2".
1.8.1
-----
Revert RB 126830 until compatibility issues are resolved.
1.8.0
-----
Increasing version to 1.8.0, because 126830 is wire-compatible, but compile-incompatible.
(RB=129457)
Modified D2ClientBuilder to accept load balancer factory as a parameter.
1.7.12
-----
(RB=130083)
Add RestliServlet to provide developers with a simple way to build a war using rest.li.
(RB=126830)
Deprecate the "items" field for the query parameters in idl. Array parameters use standard pdsc array format.
To make it backwards compatibile, request builders can still use Iterable parameters.
Fix bug that builder methods with Iterable<? extends DataTemplate> parameter are not working.
1.7.11
-----
(RB=130026)
Change build scripts to work with Gradle 1.3.
(RB=130083)
Add RestliServlet to provide developers with a simple way to build a war using rest.li.
1.7.10
-----
(RB=129645)
Add methods for common uses for ResponseFuture.getResponseEntity and RestClient.sendRequest(RequestBuilde ...)
client.sendRequest(builder.build()).getResponse().getEntity() can be simplified as follow to
client.sendRequest(builder).getResponseEntity();
1.7.9
-----
(RB=129334)
add try/catch to PropertyEvent runnables, add UnhandledExceptionHandler to NamedThreadFactory
(RB=129193)
fix a bug where the LoadBalancer config gets overwritten by empty map and causes D2 Strategy
to not instantiate properly
(RB=123406)
Change to allow clients to request data in pson-encoded format (and interpet pson-encoded data),
and for servers to be able to send pson-encoded responses.
Clients can signify that a response should be in pson format by sending the request with the
header "Accept-Type : application/x-pson". The server will then encode the result in pson and
send it back with the header "Content-Type : application/x-pson". If the client recieves a
response with this header it will decode it with the pson codec.
Some headers will now work a bit differently:
Content-Type headers will no longer be sent with responses unless there is actual body content
to encode. This change was made primarily to simplify picking the right header. There's no
point in trying to figure out the right content-type header to send back if there isn't
actually any content to send.
Accept-Type headers can now be sent with requests. The default client won't send Accept-Type
headers (same as the old code), but users can use the new RestClient constructor to create a
client that will send Accept-Type headers. Right now there are four basic options for
Accept-Type headers:
- no header: server will send back result as application/json. This is required for backwards
compatibility.
- application/json highest quality in header: server will send back result as application/json
- application/x-pson highest quality in header: server will send back result as
application/x-pson. If the server code is old, result will be sent back as application/json
- */* highest quality in header: for now, server will send back result as application/json, if
no other accept types are found. However, the server will prefer to send back responses in
formats that are explicitly mentioned in the header, even when they are lower quality than */*
(RB=128653)
ActionResponseDecoder.getEntity() will return Void.class if its fieldDef is
null, to preserve compatibility from before the Action response changes.
(RB=128251)
Add javadoc to rest.li docgen and include restspec.json files as resource in rest.li server jars.
1.7.8
-----
(RB=119453)
Add default value handling for query parameter in complex type, including all DataTemplate subclasses, array of simple types and complex types.
Union can be used as query parameter type.
(RB=127439)
Fix NPE resulting from calling .getEntityClass() on an ActionResponseDecoder for a void-returning Action.
1.7.7
-----
(RB=123370)
Add TextDataCodec to support serializing and deserializing to String, Writer and Reader.
Move getStringEncoding() from DataCodec to TextDataCodec interface. This is potentially
a backwards incompatible change.
Replace use of ByteArrayInputStream(string.getBytes(Data.UTF_8_CHARSET)) with new JacksonDataCodec
and SchemaParser APIs that take String as input.
1.7.6
-----
(RB=122933)
If union is named because it is typeref'ed, the typeref schema was
originally not available through the generated code. This change
add a new HasTyperefInfo interface. If the union is named through
through typeref, the generated subclass of UnionTemplate will also
implement this interface. This interface provides the TyperefInfo
of the typeref that names the union.
(RB=121895)
Fix encoding bug in QueryTunnel Util.
Make ByteString.toString() to return a summary instead of the whole
array as an Avro string.
HttpBridge for RPC requests should not log the whole entity.
Remove Entity body from Request/Response toString().
(RB=122813)
restli-docgen displays all nested subresources and related models in the JSON format.
1.7.5
-----
(RB=122512)
Move PsonDataCodec from test to main source dir.
1.7.4
-----
(RB=122372)
RequestContext should not be shared across requests in ParSeqRestClient
1.7.3
-----
(RB=122016)
Add support for Avro 1.6. To use Avro 1.6, depend on data-avro_1_6.
Also fix getBytes() to explicitly specify UTF-8. This has no impact
on platforms whose default encoding is UTF-8.
(RB=121948)
Add DataList serialization and deserialization to JacksonDataCodec.
1.7.2
-----
(RB=120743)
Infer order of include and fields properties of record if location information is not available.
Change generated and up-to-date log messages to info. This was useful initially for debugging. Since
it has not been a problem, changing to info will reduce build output noise from generator.
(RB=120925)
Add requisite maven configuration and pom generation to root build.gradle to enable releasing pegasus
to maven central.
(RB=120249)
Copy 'pegasus' gradle plugin into pegasus codebase from RUM, so 3rd party developers have access to
the build tools required for a working development flow. Also add maven central and maven local as repos
so developers can publish pegasus artifacts to their local repo and build standalone apps based on those
artifacts (this part will not be needed after we push pegasus artifacts to the maven central repo but
helps in the short term).
(RB=119121)
Fixed an issue where Actions that declare their return types as primitives (return int instead of
Integer, for example) no longer fail while trying to coercer the response into the correct type.
1.7.1
-----
Bad build, not published
1.7.0
-----
(RB=116297)
Add Schema compatibility checker. See com.linkedin.data.schema.compatibility.CompatibilityChecker and
CompatibilityOptions for details.
There is a change in MessageList class to take a type parameter. This is binary compatible but may
result in unchecked compilation warning/errors (depending on compiler setting.) Impact should be
minimum since this class is mostly for use within pegasus. However, it leaked by data-transform
package by DataProcessingException. This has been fixed to use List<Message> instead of MessageList.
(RB=118831)
In idl compatibility checker, allow parameter optional to be upgraded to default, and allow default to be downgraded to optional.
(RB=119617)
Add PageIncrement.FIXED to better support post-filtered search result paging.
1.6.14
-----
(RB=118380)
Add handling of long queries via X-HTTP-Method-Override
(RB=118576)
In idl compatibility checker, allow finder AssocKey to be upgraded to AssocKeys, but disallow the opposite direction.
1.6.12
-----
(RB=118288)
Fix bug in Avro generator in which referenced schema is not generated even
if schema file or name is explicitly mentioned as input args to avro schema
generator.
(RB=117895)
Fix bug in Avro schema and data translator that occurs when optional typeref
of union present. Significantly improve test coverage for typeref for avro
data and schema translation.
(RB=118838)
Add Request.getResourcePath() to provide access to the resource path parts that uniquely identify what resource the request is for.
(RB=118345)
Fix a bug where @AssocKeys of CustomTypes would cause IDL generation to crash.
Added test cases for @AssocKeys of CustomTypes.
1.6.11
------
(RB=115603)
Fix a bug in DegraderLoadBalancerStrategyV2 and DegraderLoadBalancerStrategyV3 that will not recover if we reach complete degraded state
(RB=117601)
Changed RestSpecAnnotation.skipDefault default from false to true.
(RB=116643)
All sub-level idl custom annotations are always included in class level.
1.6.10
------
(RB=116608)
Preserve PropertyEventBusImpl constructor backward compatibility
1.6.9
-----
(RB=111712)
Split original Restli example server/client into two versions: Basic and D2. The Basic version does not contain any D2 features.
Improve the D2 version of server and client to fully utilize D2.
Add gradle tasks to start all the variants of servers and clients.
Add gradle task to write D2-related configuration to ZooKeeper.
(RB=111517)
Restore method signatures changed in 1.6.7 to preserve backward compatibility
1.6.8
-----
Revert "Don't log entity body in Rest{Request,Response}Impl.toString(), since it's likely to log sensitive data."
1.6.7
-----
(RB=111517)
Fix a bug in batching multiple get requests into one, and refactor query parameters handling in
Request and RequestBuilder hierarchy.
(RB=108674)
Custom Types will now work as keys.
Keys keep track of their own schemas.
Reference types for keys are annotated in the class level annotation, as a new parameter in
RestLiCollection as keyTyperefClass, or as part of the @Key annotation for associations.
(RB=TBD)
Added docgen to restli-server-standalone config.
(RB=101117)
Custom Types will now work with action parameters.
FieldDefs/Params now keep track of their own schemas.
Action parameter metadata is now calculated in a static block in generated builder code --
no longer generated on the fly at call-time.
Action response metadata is now also calculated in a static block or in the AnnotationReader,
rather than on the fly at call-time.
Fixed a typeref bug that would cause non-custom type typerefs to appear in builders as their
reference types rather than their underlying types.
1.6.6
-----
(RB=112754)
Fix SI-515. Escape '.'s in keys from QueryParamDataMap so AnyRecords can be encoded as query params.
(RB=106343)
Fix url escaping of string when used as keys in rest.li. (SI-495)
1.6.5
-----
(RB=109987)
Rename startServer task in restli-example-server to startExampleServer.
Rename RestLiExamplesServer in restli-int-test-server to RestLiIntTestServer.
The old startServer task is still used to start the current restli-int-test-server.
(RB=110881)
Change idl custom annotation default value of skipDefault to false.
1.6.4
-----
(RB=103770)
Allow custom annotations in resource classes to be passed to generated .restspec.json files.
(RB=99932)
Add D2ClientBuilder class, which conveniently generates D2Client with basic ZooKeeper setup.
1.6.3
-----
(RB=107630)
pass requestContext up to restli layer.
1.6.2
-----
(RB=103500)
Move non-LI-specific part of photo server example into pegasus.
1.6.1
-----
(RB=105748)
Integrate compatibility level into idl checker. The exit code of the main function now depends on both
the check result and the level.
(RB=106155)
Fix incorrect handling of absent optional complex query parameters.
1.6.0
-----
(RB=101499)
Add "validatorPriority" to enable validator execution order to be specified.
See details in DataSchemaAnnotationValidator class.
* <b>Validator Execution Order</b>
* <p>
*
* Execution ordering of multiple validators specified within the same "validate"
* property is determined by the "validatorPriority" property of each validator.
*
* <code>
* "validate" : {
* "higherPriorityValidator" : {
* "validatorPriority" : 1
* },
* "defaultPriorityValidator" : {
* },
* "lowerPriorityValidator" : {
* "validatorPriority" : -1
* }
* }
* </code>
* <p>
*
* The higher the priority value, the higher the priority of the validator, i.e.
* a validator with higher prority value will be executed before the validators
* with lower priority values. The default priority value for a validator that
* does not specify a priority value is 0. Execution order of validators with
* the same priority value is not defined or specified.
* <p>
*
* Validators may be attached to a field as well as the type of the field.
* This class will always execute the validators associated to the type of the field
* before it will execute the validators associated with the field.
* <p>
*
* If schema of a data element is a typeref, then the validator associated with
* the typeref is executed after the validator of the referenced type.
* <p>
*
* Beyond the above execution ordering guarantees provided by this class,
* the execution order of validators among different data elements is determined
* by the traversal order of the caller (i.e. how data elements passed to the
* {@link #validate(ValidatorContext)} method of this class. Typically, the caller will be
* {@link com.linkedin.data.schema.validation.ValidateDataAgainstSchema}
* and this caller performs a post-order traversal of data elements.
There is an incompatible semantic change. Previously the outer typeref validators
are executed before the inner typeref validators.
(RB=104954)
Fix bug to not throw NPE when include schema is not valid.
When RuntimeException is thrown by code generator, make sure that accummulated
parser messages are emitted through a RuntimeException to help diagnose the
cause of the RuntimeException.
1.5.12
------
(RB=104243)
Fix StackOverflowError when generating mock data for schema that recursively references itself.
(RB=104714)
Move SSL configuration to from HttpClientFactory down to TransportClientFactory.
1.5.11
-----
(RB=103288)
Fix NullPointerException in testcase's shutdown method.
1.5.10
-----
(RB=99688)
Fix bug with double-encoding spaces in query parameters.
1.5.9
-----
(RB=97871)
retry d2-config-cmdline on connectionLossException
1.5.8
-----
(RB=96060)
Add doc and Javadoc of source resource class name to generated idl and client builder.
(RB=96333)
Allow http status code be specified in GET methods and Action methods. For GET, define custom GET method (by annotating
with @RestMethod.Get) with return type GetResult<V>. For Action, define the action method with return type
ActionResult<V>.
1.5.7
-----
(RB=96131)
Fix NPE in RestRequestBuilderGenerator when processing legacy IDL format.
1.5.6
-----
(RB=95037)
Generated rest client builders now contain Javadoc extracted from .restspec.json files.
Such document originally comes from the Javadoc of corresponding resource classes.
1.5.5
-----
(RB=94738)
Add consistency check between SSLContext and SSLParameters arguments
of HttpNettyClient constructor.
(RB=95371)
Deprecate RestLiConfig.setClassLoader(). RestLi now loads resource
classes using the current thread's contextClassLoader.
1.5.4
-----
(RB=93597)
Enhance JSR330Adapter to support injection via constructor arguments,
allowing a safer coding practice of declaring final member variables
in rest.li resources.
(RB=92918)
RestLiResourceModelExporter now returns a GeneratorResult of files modified/created so it is more consistent with the
other generator classes.
1.5.3
-----
(RB=93836)
Detect class name conflicts that occur when a generated class name
is the same as the class name for a NamedDataSchema.
Also clean up DataTemplateGenerator code.
Array items and map values of generated classes is always the
the first schema with custom Java binding or the fully
dereferenced schema if there is no custom Java binding.
1.5.2
-----
(RB=92697)
Add SSL support to R2 http client.
1.5.1
-----
(RB=93099)
Remove cow.
1.5.0
-----
(RB=93107)
Fix bug of JMX bean
(RB=93024)
Follow on change to remove old Rpc code in data.
(RB=93011)
Fix javadoc, imports, syntactical changes in data.
(RB=92227)
Remove support for RpcEndpointGenerator and ExceptionTemplates - this functionality has been
deprecated and is currently unused.
(RB=92505)
Fix bug that restli-docgen fail to initialize when a resource has 2 or more subresources.
This is because the hierarchy stack is not popped after visiting a resource.
Display the full name (namespace + resource name) of resources and subresource in HTML.
If the resource does not have namespace, only display resource name.
1.4.1
-----
(RB=92103)
Allow directory command line arg for rest client builder generator.
The reason for this change is that network build is invoking the generator
for each file because there is no clean and safe way to pass a list of
file names in the java ant task.
After this change, network build can pass the directory as a single argument and
the generator will scan for restspec.json files in the directory.
1.4.0
-----
(RB=79135)
Add parttioning support to d2.
Support range-based and hash-based partitioning.
Update scatter/gather API and add "send to all partitions" API in restli/extras.
(RB=91895)
Allow directory command line arg for data template and avro schema translator.
The reason for this change is that network build is invoking the generator
for each file because there is no clean and safe way to pass a list of
file names in the java ant task.
After this change, network build can pass the directory as a single argument and
the generator will scan for pdsc files in the directory.
(RB=91765)
Fix intermittent TestAbstractGenerator failures.
1.3.5
-----
(RB=90955)
Fix issue with erroneously decoding query parameters, causing issues when a query parameter value contains "*". This issue was introduced in 1.3.2
1.3.4
-----
(RB=88872)
Revise the documentation generator for idl files in RestLiResourceModelExporter to handle overloaded methods
in resources.
(RB=90000)
restli-docgen depends on Apache Velocity 1.5-LIN0 instead of previously 1.7. This change is necessary to
fix the trunk blocker ANE-6970.
(RB=90280)
Add main function to RestLiResourceModelCompatibilityChecker so that it can be invoked in command line.
The usage pattern is:
RestLiResourceModelCompatibilityChecker [prevRestspecPath:currRestspecPath pairs]
1.3.3
-----
(RB=88405)
Refactor tests and add AvroUtil class to data-avro to allow common models test
to not depend on test artifacts from pegasus.
(RB=88304)
Add access to client factories from D2 Facilities interface.
1.3.2
-----
(RB=87108)
Enhance validator API to enable AnyRecord validator to be implemented.
See AnyRecordValidator example and test cases in data.
(RB=83380)
Add support for structured query parameters on CRUD methods.
(RB=86674)
Remove c3po support
(RB=86313)
Modify IDL generation to only emit shallow references to named schema types.
1.3.1
-----
(RB=86000)
Allow "registration" of custom validators be more automatic (without having to explicitly
add to map and passing the map to DataSchemaAnnotationValidator.
* The value of this property must be a {@link DataMap}. Each entry in this {@link DataMap}
* declares a {@link Validator} that has to be created. The key of the entry determines
* {@link Validator} subclass to instantiate.
* <p>
*
* The key to {@link Validator} class lookup algorithm first looks up the key-to-class
* map provided to the constructor to obtain the {@link Validator} subclass. If the key
* does not exist in the map, then look for a class whose name is equal to the
* provided key and is a subclass of {@link Validator}. If there is no match,
* then look for a class whose fully qualified name is derived from the provided by key
* by using "com.linkedin.data.schema.validator" as the Java package name and capitalizing
* the first character of the key and appending "Validator" to the key as the name
* of the class, and the class is a subclass of {@link Validator}.
(RB=79648)
New on-line documentation generator for Rest.li server.
When passing an implementation of com.linkedin.restli.server.RestLiDocumentationRequestHandler to
RestLiServer through RestLiConfig, the server will respond to special URLs with documentation content
such as HTML page or JSON object.
The default implementation is from the new docgen project, which renders both HTML and JSON documentation.
It also provides an OPTIONS http method alias to the JSON documentation content.
1.3.0
-----
(RB=85284)
Moved jetty dependents in r2, restli-server to new sub-projects r2-jetty, restli-server-standalone
1.2.5
-----
(RB=84826)
To make sure custom Java class bound via typeref are initialized that their static initializers are
executed to register coercers, the code generator will generate a call Custom.initializeCustomClass
for each custom class referenced by a type.
For generality, this Custom.initializeCustomClass is called regardless of whether the coercer class
is also explicitly specified.
The way in which explicit coercer class initialization is performed has also changed to use
Class.forName(String className, boolean initializer, ClassLoader classLoader) with the initialize
flag set to true. This will cause the class to initialized without accessing the REGISTER_COERCER
static variable or trying to construct an instance of the coercer class. This allows the use of
static initializer block to initialize explicitly specified coercer class.
This change is not backwards compatible if the Coercer depends on constructing a new instance
to register the coercer.
(RB=84726)
Add more test code for AvroOverrideFactory. Fixed a few bugs, i.e when schema/name and translator/class is not
specified, name is specified without namespace.
(RB=84335)
Add support for custom data translator for translating from Avro to Pegasus data representation when there
is a custom Avro schema binding.
* A custom Avro schema is provided via as follows:
* <pre>
* {
* "type" : "record",
* "name" : "AnyRecord",
* "fields" : [ ... ],
* ...
* "avro" : {
* "schema" : {
* "type" : "record",
* "name" : "AnyRecord",
* "fields" : [
* {
* "name" : "type",
* "type" : "string"
* },
* {
* "name" : "value",
* "type" : "string"
* }
* ]
* },
* "translator" : {
* "class" : "com.foo.bar.AnyRecordTranslator"
* }
* }
* }
* </pre>
*
* If the "avro" property is present, it provides overrides that
* override the default schema and data translation. The "schema"
* property provides the override Avro schema. The "translator"
* property provides the class for that will be used to translate
* from the to and from Pegasus and Avro data representations.
* Both of these properties are required if either is present.
*
* If an override Avro schema is specified, the schema translation
* inlines the value of the "schema" property into the translated
* Avro schema.
*
* If a translator class is specified, the data translator will
* construct an instance of this class and invoke this instance
* to translate the data between Pegasus and Avro representations.
(RB=80898)
Allow query parameters to be custom types (SI-318)
Example customType annotation:
* @QueryParam(value="o", typeref=CustomObjectRef.class) CustomObject o
where CustomObjectRef is an class generated off of a pdsc that specifies the underlying type of
CustomObject.
Users must also write and register a coercer that converts from the custom object to the
underlying type and back.
1.2.4
-----
(RB=82484)
Add support for custom Avro schema binding to Pegasus to Avro Schema translator.
* A custom Avro schema is provided via as follows:
* <pre>
* {
* "type" : "record",
* "name" : "AnyRecord",
* "fields" : [ ... ],
* ...
* "avro" : {
* "schema" : {
* "type" : "record",
* "name" : "AnyRecord",
* "fields" : [
* {
* "name" : "type",
* "type" : "string"
* },
* {
* "name" : "value",
* "type" : "string"
* }
* ]
* }
* }
* </pre>
*
* If the "avro" property has a "schema" property, the value of this
* property provides the translated Avro schema for this type. No further
* translation or processing is performed. It simply inlines the value
* of this property into the translated Avro schema.
(RB=82990)
Support a custom ClassLoader in the RestliConfig to use when scanning/loading RestLi classes.
(RB=83273)
Bump ParSeq to 0.4.4
1.2.3
-----
(RB=82646)
Revert incompatible change to bytecode signatures of builder methods introduced in 1.1.7
(RB=81647)
Fix bug of idl compatibility checker which did not check for new optional parameters and
custom CRUD methods.
The report messages are revised and parameterized to be more readable.
1.2.2
-----
(RB=81960)
Prototype custom class for records (not for production use yet.)
Enable auto-registration of coercer when it is not possible to use
a static initializer on the custom class to register. Here is the
comments from com.linkedin.data.template.Custom.
/**
* Initialize coercer class.
*
* The preferred pattern is that custom class will register a coercer
* through its static initializer. However, it is not always possible to
* extend the custom class to add a static initializer.
*
* In this situation, an optional coercer class can also be specified
* with the custom class binding declaration in the schema.
*
* <pre>
* {
* "java" : {
* "class" : "java.net.URI",
* "coercerClass" : "com.linkedin.common.URICoercer"
* }
* }
* </pre>
*
* When another type refers to this type, the generated class for referrer
* class will invoke this method on the coercer class within the referrer
* class's static initializer.
*
* This method will reflect on the coercer class. It will attempt to read
* the {@code REGISTER_COERCER} static field of the class if this field is declared
* in the class. This static field may be private.
* If such a field is not found or cannot be read, this method will attempt
* to construct a new instance of the coercer class with the default constructor
* of the coercer class. Either of these actions should cause the static initializer
* of the coercer class to be invoked. The static initializer
* is expected to register the coercer using {@link #registerCoercer}.
* If both of these actions fail, then this method throws an {@link IllegalArgumentException}.
*
* Note: Simply referencing to the coercer class using a static variable or
* getting the class of the coercer class does not cause the static
* initializer of the coercer class to be invoked. Hence, there is a need
* actually access a field or invoke a method to cause the static initializer
* to be invoked.
*
* The preferred implementation pattern for coercer class is as follows:
*
* <pre>
* public class UriCoercer implements DirectCoercer<URI>
* {
* static
* {
* Custom.registerCoercer(URI.class, new UriCoercer());
* }
*
* private static final Object REGISTER_COERCER = null;
* ...
* }
* </pre>
*/
(RB=80633)
Add more diagnostic details to idl compatibility report.
1.2.1
-----
(RB=81299)
2nd installment of imported util cleanup
Get rid of timespan dependency.
Fix indentation errors.
Remove used classes.
(RB=81019)
1st installment. Remove unneeded code from imported util cases.
Fix problem with pegasus-common test directory is under src/main instead of src.
Remove LongStats. Make ImmutableLongStats the replacement.
Remove callsInLastSecond tracking (this is legacy that is not used and not needed in network.)
Remove unused methods in TrackerUtil.
(RB=80037)
Eliminate pegasus dependency on util-core, in preparation for open sourcing. This change
copies a number of classes from util-core related to Clock, CallTracker, and Stats. These
classes have been placed in different packages, and are considered forked. The only functional
change is that CallTracker no-longer ignores BusinessException when counting errors.
1.2.0
-----
(RB=76684)
Experimental ParSeq client/server support
1.1.8
-----
(RB=80013)
Fix bug where EnumDataSchema.index() always returned 0 when a symbol is found
(RB=73477)
Add support for inspecting and modifying Data objects returned from DataIterators.
Data objects can be counted, accumulated, transformed and removed declaratively
based on value, schema properties or path in the Data object. The intent is to
provide a core set of primitives that may be used to build decoration, filtering,
mapping, etc. for Data objects.
See: com.linkedin.data.it.{Builder, Remover, Counter, ValueAccumulator, Transformer}
1.1.7
-----
(RB=77548)
Build "next" pagination link in collection result when start+count < total (iff total is provided by application code).
(RB=78265, 78300)
Moved spring integration from restli-contrib-spring to the pegasus-restli-spring-bridge sub-project in container.
General dependency injection functionality (JSR-330) has been moved to restli-server sub-project. Empty restli-contrib-spring
project is not removed from Pegasus, to preserve backwards compatibility with integration tests. All dependencies on
restli-contrib-spring should be removed.
1.1.6
-----
(RB=74812)
Add RetryZooKeeper that handles ZooKeeper connection loss exception.
1.1.5
-----
(RB=76630)
Added multiple tests for complex resource keys, fixed a number of bugs in client builders.
(RB=78028)
Add getFacilities() to DynamicClient, in order to provide single point of entry for D2.
1.1.4
-----
(RB=74709)
Usability fixes to RestLiResponseException - use GetMode.NULL for accessors, add hasXyz() methods.
(RB=73936)
Clean up Exception handling in RestClient. Previously, one could receive different exception
types for the same error in the Callback interface versus the two flavors of Future interface.
For example, if the server returned a valid error response, the caller of
ResponseFuture.getResponse() would receive a RestLiResponseException, but Callback.onError()
or the caller of Future.get() would receive a RestException.
Now, a RestLiResponseException is always generated when a valid error response is received from
the server. Users of the Callback interface will receive a RestLiResponseException in
Callback.onError(). The ResponseFuture interface will throw a RestLiResponseException,
while the standard Future interface will throw a RestLiResponseException wrapped in an
ExecutionException.
(RB=73689)
Remove dependency on ASM and Jersey package scanning logic. Our ASM version is fairly
old, and presents a compatibility challenge, especially for open source usage.
This patch removes the relevant Jersey code and implements very simple package scanning
by loading the classes in the specified packages. In theory this could waste more
resources by loading classes unnecessarily. In practice, we expect the rest.li resource
packages to be fairly narrowly specified, so it should not be a significant issue.
(RB=73067)
Improve exception message when there are Avro to Pegasus data translation errors.
This changes what DataTranslationException includes in getMessage().
(RB=72875)
Add Data to Avro Schema translation mode called OptionalDefaultMode. This mode allows
the user to control how optional fields with default value is translated. The previous
behavior is to translate the default value. This new option allows all optional fields
to be translated to have default value of null (instead of the translated default value.)
This is appropriate for Avro because the default value is only used if it is present
in the reader schema and absent in the writer schema. By translating default value to
null, the absent field will have null as its value (which is a better indication of
absence and would translate more cleanly to Pegasus as an absent field). I think this
is more correct, then filling in with the translated default value for an absent field.
In addition, this also improves the Pegasus user experience. If the user did not specify
a default value for field, this is translated to a union with null and default value set to
null. Because of Avro limitation, it means that other uses of this record cannot initialize
this field to another default value. This should be allowed because specific use case
may indeed have valid default values for that specific use of the record.
Although the new mode has been added, the default is to be backwards compatible and
translate the default value (instead of forcing the translation to null.) We may change
this to be the default in the future. However, this may break backwards compatibility of
generated schema in the case that the Avro default value is significant (i.e. fields
absent in writer schema but present in reader schema.)
1.1.2
-----
(RB=70773)
fix bug in degraderStrategyV2 where zookeeper updates would cause getTrackerClient to
return null for some calls because the existing state didn't have trackerclient information
and the threads weren't waiting for a good state.
1.1.1
-----
(RB=72064)
Fix bug in which "include" and "fields" are not processed in the same order in
which they are defined.
As part of this fix, the parser needs to have knowledge of the location of
a data object within the input stream. JacksonCodec has been extended to
provide this location. Because this location is now available, various parsers
have been improved emit error messages that include the likely location