Blog Options
Archive
<< April 2024 >>-
Wednesday 17
- New free component for sophisticated file uploads with TMS WEB Core -
Tuesday 16
- Closing the gap with TMS FNC UI Pack new additions -
Thursday 11
- Unveiling the Latest Enhancements in TMS VCL UI Pack -
Friday 5
- TMS components and Delphi and C++Builder 12.1 -
Wednesday 3
- Customizing the login page of your application using TMS Sphinx
- A Python library for using StellarDS.io effortlessly
- Introducing: How it Works with Holger - Building a Pexels gallery app with TMS WEB Core video series
- TMS FNC Cloud Pack with StellarDS.io backend: unparalleled productivity in VCL & FMX
Authors
- Bernard Roussely (1)
- Wagner Landgraf (82)
- Roman Yankovsky (2)
- Bart Holvoet (27)
- Aaron Decramer (17)
- Pieter Scheldeman (99)
- Nancy Lescouhier (32)
- Adrian Gallero (33)
- Bruno Fierens (403)
- Marcos Douglas B. Santos (5)
- Wagner R. Landgraf (1)
- Bradley Velghe (16)
- Bernard (2)
- Andrew Simard (86)
- Holger Flick (15)
- Gjalt Vanhouwaert (30)
- Tunde Keller (22)
- Masiha Zemarai (119)
Blog
All Blog Posts | Next Post | Previous PostTMS XData 4.5: Parameter Binding and SwaggerUI
Bookmarks:Wednesday, June 19, 2019
TMS XData 4.5 has been released with two major new features: parameter binding and Swagger UI.SwaggerUI is a great new addition, just by setting two simple properties in TXDataServer component (you can do it from the object inspector at design-time):
XDataServer1.SwaggerOptions.Enabled := True; XDataServer1.SwaggerUIOptions.Enabled := True;
Parameter Binding
Flexible parameter binding via attributes is another nice addition that provides you more control on how the API method must be invoked via raw HTTP requests - note that if you use Delphi XData Client or TMS Web Core XData Web Client, this is transparent to you, you just specify the method and parameter, and binding and routing is automatic.
But if you intend to call your API from non-Delphi platforms, you can now fully control how it works. You can declare methods like this:
procedure Process( [FromPath] PathA: Integer; [FromQuery] QueryA: string; BodyA, BodyB: string; [FromQuery] QueryB: Boolean; [FromPath] PathB: string; ): double;
POST /tms/xdata/MyService/Process/5/value?QueryA=queryvalue&QueryB=true HTTP/1.1 { "BodyA": "one", "BodyB": "two" }
If you want to see both parameter binding and SwaggerUI in action, take a look at this new video about it:
Wagner Landgraf
Bookmarks:
This blog post has received 9 comments.
2. Wednesday, June 19, 2019 at 11:40:11 PM
Woo hoo!!!
Price Rhett
3. Thursday, June 20, 2019 at 2:16:55 PM
So awesome!
Bosnjak Boris
4. Thursday, June 20, 2019 at 7:24:36 PM
Good new functions!
Juhász Zsolt
5. Friday, June 21, 2019 at 2:49:14 PM
Parameter Binding is a GREAT addition ! Congrats and Thanks!
Farias Anderson
6. Friday, June 21, 2019 at 3:18:11 PM
Thank you all for the great comments, I''m happy for all the positive feedback on this release!
Wagner R. Landgraf
7. Tuesday, February 11, 2020 at 1:36:31 PM
Just started using swagger in my testing - what a great feature!
Jason Chapman
8. Tuesday, February 11, 2020 at 1:42:35 PM
Thanks, Jason!
Wagner R. Landgraf
9. Thursday, April 9, 2020 at 9:06:27 PM
Hi Wagner, in specification by client we have such path:
/v1/companies/:company/users/:username/signatures
How we can implement that with use of [FromPath] ?
/v1/companies/:company/users/:username/signatures
How we can implement that with use of [FromPath] ?
Dmitry
All Blog Posts | Next Post | Previous Post
Piffer Claudio