Commit Graph

363 Commits

Author SHA1 Message Date
Daniele Teti
4139fc4a26 [+] Added URLEncode, URLDecode 2021-02-25 10:50:57 +01:00
Daniele Teti
c55bfea9da [+] Small improvement in custom type serialisers 2021-02-15 18:28:45 +01:00
Daniele Teti
4b8491a47c [+] Small optimizations in router and core 2021-02-03 16:04:36 +01:00
João Antônio Duarte
65d03ad065 fix for https://github.com/danieleteti/delphimvcframework/issues/472 2021-01-28 11:56:20 -03:00
Daniele Teti
77ad5ecd10 [+] fix for nil objects in lists during serialization
[+] preparing for 3.2.2-nitrogen
2021-01-27 20:25:35 +01:00
João Antônio Duarte
f826315b46 The TMVCWebRequest.GetParams method failed to look for a field in the body's content when there was some url encoding character. Fixed to check body content only if content-type is application/x-www-form-urlencoded 2020-10-21 16:45:07 -03:00
Daniele Teti
f63cc4469b Improved StaticFilesMiddleware 2020-09-16 15:56:14 +02:00
Daniele Teti
2ae2068807 Improved TMVCStaticFilesMiddleware 2020-09-14 15:52:50 +02:00
Daniele Teti
3755348925 Improved static files middleware 2020-09-11 18:14:28 +02:00
Daniele Teti
a0aea669ee
Merge pull request #416 from osaris/feature_rootnode_bodyaslistof
Handle RootNode when deserializing a collection of objects (BodyAsListOf)
2020-09-08 16:22:28 +02:00
Daniele Teti
b27db6122e Improved EMVCException rendering, added unit tests (202 so far) 2020-09-08 15:25:44 +02:00
Raphaël Emourgeon
fd4a545952 Handle RootNode when deserializing a collection of objects (BodyAsListOf). 2020-09-07 11:28:53 +02:00
Daniele Teti
ae1eda03e1 Added GetFrameworkType method 2020-08-22 15:37:08 +02:00
Daniele Teti
7576ab8bf8 Added the ability to deserialize an object starting from an arbitrary node in the JSON (or other format) present in the request body.
Improved the primary key type handling for manual handling in MVCActiveRecord.
Improved activerecord_showcase sample.
2020-08-13 17:40:02 +02:00
Daniele Teti
465de5cbab TMVCRenderer methods used by TEntityProcessor become public again 2020-08-09 09:38:54 +02:00
Daniele Teti
a3464c38d0 Small router improvements. 2020-08-08 01:03:37 +02:00
Daniele Teti
0d7fa465fc TableName is no more serialized in ActiveRecord 2020-07-18 20:14:58 +02:00
Daniele Teti
e6a7c80ef6 Improved caching and add X-Powered-By optional header 2020-06-29 19:11:41 +02:00
Daniele Teti
aaa34ca410 Added "TMVCActiveRecord.SelectOneByRQL", Removed "Context.Request.HeaderNames" 2020-06-22 15:24:20 +02:00
Daniele Teti
af91c92563 Added Context.Request.HeaderNames: TArray<String> 2020-06-20 19:41:12 +02:00
Daniele Teti
516101ebb8 https://github.com/danieleteti/delphimvcframework/issues/388 2020-05-28 22:35:45 +02:00
Daniele Teti
371d09194a UnitTest // Delphi 10.4 Sydney support 2020-05-27 11:28:22 +02:00
Daniele Teti
028089969a TMVCEngine.Config property is now read-only. Can be changed only in the anonymous method injected in the constructor. (All the samples have been updated - from an idea of @Spinettato a.k.a. Danielino) 2020-05-11 23:39:43 +02:00
spinettaro@gmail.com
570146d313 improved exception handling in OnBeforeDispatch in term of Status code
added correct HTTP STATUS CODE when MAX_REQUEST_SIZE exception is raised
2020-05-09 15:56:54 +01:00
Daniele Teti
b259b72153 Removed debug logs 2020-04-30 11:27:27 +02:00
Daniele Teti
89d723fbde Added new sample to show hot to use StaticFilesMiddleware in SPA web applications. Added ability to don't load system controller using Config[TMVCConfigKey.LoadSystemControllers] := 'false'; in the configuration block. 2020-04-29 17:53:29 +02:00
João Antônio Duarte
fafb73823a Change to OnAfterRouting to be executed after exception handling 2020-04-28 19:08:54 -03:00
João Antônio Duarte
87db1f09a5 Added OnAfterRouting method to IMVCMiddleware 2020-04-27 20:36:45 -03:00
João Antônio Duarte
7dde0cf7d9 Correction of exception raised when middleware tried to map url with invalid characters as path to a file 2020-04-24 21:55:36 -03:00
João Antônio Duarte
faa892df7f Settings for static files removed from the TMVCEngine core 2020-04-24 21:20:46 -03:00
João Antônio Duarte
e029e52907 Settings of static files added as parameters in the middleware constructor 2020-04-24 20:48:07 -03:00
João Antônio Duarte
ebcda178ff Merge remote-tracking branch 'upstream/master' into middleware_staticfiles 2020-04-24 19:13:44 -03:00
Daniele Teti
ba2be8f7e1 Updated some samples 2020-04-24 14:48:30 +02:00
João Antônio Duarte
2e105ec59f The static file server that was at the core of TMVCEngine has been moved to TMVCStaticFilesMiddleware middleware 2020-04-23 21:48:39 -03:00
Daniele Teti
e437d33434 https://github.com/danieleteti/delphimvcframework/issues/355 2020-04-12 12:38:00 +02:00
João Antônio Duarte
91f2bebcfc
Added support for guid path parameters (#353) 2020-04-09 11:04:45 -03:00
Daniele Teti
18e988d604 https://github.com/danieleteti/delphimvcframework/issues/356 2020-04-08 13:00:32 +02:00
Daniele Teti
4a1ef47bd3 "404 Not Found" exceptions now contains the requested URL (as in the log) 2020-04-07 10:37:33 +02:00
Daniele Teti
36ca9d43dc https://github.com/danieleteti/delphimvcframework/issues/337 2020-04-03 11:56:14 +02:00
Daniele Teti
2273c88b00 Added MediaTypes TMVCMediaType.IMAGE_X_ICON 2020-04-02 15:28:06 +02:00
Daniele Teti
1fd7740048 Added JSONRPC Hooks - Renamed RenderXXX Methods 2020-03-30 13:30:45 +02:00
Daniele Teti
992262d152 Added "OnRouterLog" configuration - Fixed packages to include "MVCFramework.Nullables.pas" 2020-02-26 13:10:41 +01:00
Andrea Ciotti
13571aa584 Configurable log for requests 2020-02-24 10:37:37 +01:00
Daniele Teti
92dcbd8b40 FIXED a Vulnerability bug which affects some deployment configurations. 2020-02-13 23:33:30 +01:00
Daniele Teti
3388354743 Serialization support for all the types in MVCFramework.Nullables 2020-02-03 10:51:40 +01:00
Daniele Teti
3233ea123f Fixed a mleak in caso of disconnection while the request is running (https://github.com/danieleteti/delphimvcframework/issues/323) 2020-01-24 10:09:14 +01:00
Daniele Teti
8144baf40c Nulls support in MVCActiveRecord (check activerecord_showcase sample) 2020-01-06 16:49:18 +01:00
Daniele Teti
b097121ee7 First working version of nullable support for mvcactiverecord 2020-01-04 12:54:38 +01:00
Daniele Teti
e2f6bd76d4 https://github.com/danieleteti/delphimvcframework/issues/312 2019-12-23 18:35:21 +01:00
Mauricio Montuori
1f2556ecdc use HTTP_STATUS.BadRequest instead of 400 value 2019-11-18 15:16:27 -03:00
Mauricio Montuori
d9a42e9629 Send error 400 (Bad Request) when a parameter value is wrong 2019-11-18 14:46:01 -03:00
Mauricio Montuori
569f42360f Parameter's Error conversion Exception handling improved 2019-11-18 14:41:25 -03:00
Daniele Teti
157c7208f1 Improved Nullable Types sample 2019-11-17 12:36:27 +01:00
Daniele Teti
529b5c7850 Added comments on jsonrpc/describe output 2019-11-06 20:42:17 +01:00
Daniele Teti
51b0efdba4 Swagger PathID renamed to OperationID
Moved MVCRequiresAuthenticationAttribute into MVCFramework.pas
2019-10-30 00:25:01 +01:00
Daniele Teti
6bdf5547bc Added ToMVCList to wrap any object and try to use as list 2019-10-10 20:16:48 +02:00
João Antônio Duarte
58153c1abf Merge remote-tracking branch 'upstream/master' into serialize_interfaces
# Conflicts:
#	sources/MVCFramework.Serializer.JsonDataObjects.pas
#	sources/MVCFramework.pas
2019-10-09 19:59:04 -03:00
Daniele Teti
0d93ace653 v3.2 (boron) RC1 2019-10-09 23:24:08 +02:00
João Antônio Duarte
3a23d4edf9 Merge remote-tracking branch 'upstream/master' into serialize_interfaces
# Conflicts:
#	sources/MVCFramework.pas
2019-09-25 11:41:11 -03:00
Daniele Teti
a3738777a7 Added SwagDoc 2019-09-25 14:54:04 +02:00
Daniele Teti
6ce183e493
Merge branch 'master' into SwagDoc 2019-09-25 13:01:59 +02:00
João Duarte
530edca638 Added overload to render method for types Iinterfaces 2019-09-18 11:53:54 -03:00
Daniele Teti
698f34354c Added ResponseCreated, ResponseNoContent, ResponseAccepted 2019-09-01 20:36:36 +02:00
Daniele Teti
fea37fed42 RenderCreated 2019-08-28 00:18:40 +02:00
Daniele Teti
69bec54b31 Merge branch 'master' of https://github.com/danieleteti/delphimvcframework 2019-08-28 00:16:08 +02:00
viniciussanchez
4c1c78fa54 Added QueryParams property of type TDictionary<string, string> like C… 2019-08-23 08:42:20 -03:00
Daniele Teti
898fd91bc9 https://github.com/danieleteti/delphimvcframework/issues/268 2019-08-23 12:16:29 +02:00
João Antônio Duarte
ec2ce12089 Change in JWT middleware error return to be captured by TMVCEngine CustomHandlerException 2019-08-13 11:36:09 -03:00
Geoffrey Smith
c54c157dc7 Update Swagger Controller 2019-08-05 21:37:42 +10:00
Geoffrey Smith
b793d5b65e Change MVCPathParam parameters to have Pattern instead of description 2019-08-03 14:26:57 +10:00
Geoffrey Smith
d9b0677788 Add Attribute with extra info about path parameter 2019-08-03 10:16:34 +10:00
Daniele Teti
cc64a564a8 FIXED compatibility problems with XE7 2019-08-02 12:32:31 +02:00
Geoffrey Smith
e4f57686e2 Add Start of Clientside REST API Generator 2019-07-30 16:29:31 +10:00
Geoffrey Smith
f406468754 Add Attributes used for documenting MVC Controllers and Data Structures 2019-07-29 23:47:12 +10:00
Geoffrey Smith
6029777b10 Add back units previously removed from uses clauses 2019-07-29 23:26:33 +10:00
Geoffrey Smith
45acb0437c Merge branch 'master' of https://github.com/danieleteti/delphimvcframework 2019-07-29 22:10:09 +10:00
Daniele Teti
0992ada70a https://github.com/danieleteti/delphimvcframework/issues/225 2019-07-27 00:57:37 +02:00
Daniele Teti
b183eddd81 Small improvements in GetContentFields 2019-07-26 21:30:36 +02:00
viniciussanchez
fc4966ef25 Added LowerCase in ContentField name 2019-07-26 14:37:18 -03:00
viniciussanchez
ca5278c4ac Adjusted lazy-loading TDictionary 2019-07-26 14:28:45 -03:00
viniciussanchez
7004afd101 ContentFields property created in class TMVCWebRequest 2019-07-26 13:59:07 -03:00
viniciussanchez
47a2a0592f Render procedure overload to accept StatusCode and JSON as a parameter. 2019-07-26 10:04:19 -03:00
viniciussanchez
338db990fd Remove System.JSON reference 2019-07-26 09:45:40 -03:00
viniciussanchez
ba9b896af8 AErrorMessage default is empty when AErrorCode is 204 (No content) 2019-07-26 09:42:57 -03:00
viniciussanchez
db5b505cf7 IETF - RFC 6750 #244 2019-07-26 08:51:11 -03:00
geoffsmith82
2e239baacb Remove unneeded Indy file references 2019-07-06 16:11:18 +10:00
Daniele Teti
39741b08ec Small improvements on webrequest class 2019-05-19 14:20:15 +02:00
Daniele Teti
53bdb8acc0 Improved MVCActiveRecord 2019-05-16 00:17:19 +02:00
Daniele Teti
7b39d94537 Support for X-HTTP-Method-Override to work behind corporate firewalls. 2019-05-10 00:47:18 +02:00
Daniele Teti
6a664d608c 3.1.1-beryllium-RC5 2019-05-09 21:00:26 +02:00
Daniele Teti
fc28b3ba5e Removed strings indexing 2019-05-02 17:39:17 +02:00
Daniele Teti
020cdbc0fa Added custom exception handling. Based on work of David Moorhouse (https://github.com/danieleteti/delphimvcframework/issues/191) 2019-04-20 12:10:33 +02:00
Daniele Teti
d20ef3fe41 Added '/describe' to json-rpc
Added 'MVCInheritable' attribute
2019-04-03 09:45:31 +02:00
Daniele Teti
e86d004808 Compatibility Issues Fixed 2019-03-19 12:06:25 +01:00
Daniele Teti
dc2328c89a Added Dict function to easily return a dictionary of strings.
Improved exceptions rendering.
2019-03-16 17:21:42 +01:00
Daniele Teti
5da30ed243 Extended support for HATEOAS 2019-03-10 16:29:53 +01:00
Daniele Teti
beb059a0e3 Improved support for HATEOAS in renders 2019-03-08 09:34:03 +01:00
Daniele Teti
f7f0ce8548 Fixed! #164 2019-03-06 12:01:00 +01:00
Daniele Teti
9ebb33969a - New overloads for all the Log* calls. Now it is possibile to call LogD(lMyObject) to get logged lMyObject as JSON.
- Added new unit tests for
- Improved `MVCEntitiesGenerator`
2019-03-05 20:57:25 +01:00
Daniele Teti
75e975811b - Improved! In case of unhandled exception TMVCEngine is compliant with the default response content-type (usually it did would reply using text/plain).
- Fix! [issue184](https://github.com/danieleteti/delphimvcframework/issues/184).
2019-02-24 20:43:40 +01:00
Daniele Teti
8ed859b7d1 New build system based on pyinvoke 2019-01-08 12:48:53 +01:00
Daniele Teti
f64eebff6a Improvements to the JSON-RPC layer, added MAX_REQUEST_SIZE check and config key. UPdated IDE Expert to add the new config key in the generated code. 2018-12-17 00:40:27 +01:00
Daniele Teti
c5800b3354 Added dmvcframework package
Features freeze for 3.1 (lithium)
Working on the planned issues for this milestone https://github.com/danieleteti/delphimvcframework/milestones/3.1%20(helium)
2018-12-09 23:05:01 +01:00
Daniele Teti
d4a23e52fb Removed unit MVCFramework.TypesAliases.pas
Updated JsonDataObjects.pas
2018-11-24 16:57:04 +01:00
Daniele Teti
505710f9cd Small fixes to custom stream json serializer 2018-11-09 18:12:29 +01:00
Daniele Teti
7ca4ccbe59 Completed refactoring about IMVCTypeSerializer 2018-10-31 01:07:25 +01:00
Daniele Teti
132e169542 Changes to the custom type serializer interface 2018-10-30 13:53:18 +01:00
Daniele Teti
70c1e55e94 New MVCActiveRecord showcase samples
New Unit Tests for Compression in TRESTClient
Updated RQL Parser and compilers
New EntitiesGenerator (alpha)
Improved unittests
Updated landing page
2018-10-23 16:18:50 +02:00
Daniele Teti
96bbb83209 Improved support for MySQL in MVCActiveRecord
Better multi thread handling in MVCActiveRecord
2018-10-14 18:24:07 +02:00
Daniele Teti
e4cd5894ae MVCActiveRecord Framework, Sample for MVCActiveRecord Framework 2018-09-25 15:38:52 +02:00
Daniele Teti
bb454af16a - Speed improvement! Removed enhanced visibility for action methods. Now only public and published methods can be used as actions.
- `TMVCController.Create` is `virtual`! Now on your base controllers can be even more powerful!
- FIX for [issue #143](https://github.com/danieleteti/delphimvcframework/issues/143)
2018-08-08 17:12:12 +02:00
Daniele Teti
7998811c74 - 404 and 500 status code returns always a text/plain content-type
- Refactored ISAPI sample
2018-08-08 15:43:37 +02:00
Daniele Teti
00d5a9699a - Config[TMVCConfigKey.FallbackResource] is served only if request path is empty or /.
- Now the JSON-RPC executor provides methods to handle HTTP headers for JSON-RPC requests and notifications.
- FIX for [issue #141](https://github.com/danieleteti/delphimvcframework/issues/141)
- `TDataSetHolder` is a new render that is able to render a dataset with a set of custom metadata (eg `count`,`page` etc). Check [issue #137](https://github.com/danieleteti/delphimvcframework/issues/137)
2018-08-05 20:31:56 +02:00
Daniele Teti
34bc5e0638 Added JSON-RPC Notification Support
Added IMVCJSONRPCExecutor for a simpler use of JSON-RPC servers
2018-05-16 19:46:35 +02:00
Daniele Teti
4daba2ea67 Some refactoring preparing RC13 2018-02-20 22:36:36 +01:00
Daniele Teti
b49bc82d8b 3.0 RC12 hydrogen 2018-01-29 17:30:53 +01:00
Daniele Teti
ae3a3ec4e6 Added ViewData and ViewDataset. New Compression Sample. 2017-11-23 17:31:26 +01:00
Daniele Teti
a8d57bb78b RC10 2017-10-16 22:57:49 +02:00
Daniele Teti
ac654658f1 Improved JSON RPC 2.0 Client Sample 2017-10-09 16:17:34 +02:00
Daniele Teti
6321021430 Initial commit for JSON-RPC 2.0 2017-09-24 19:41:23 +02:00
Daniele Teti
25df8e9035 Fixed a rare bug on TEncoding and BodyAs<T>
Small JWT code improvements
2017-09-23 15:03:55 +02:00
Daniele Teti
4942c3253b JWT Optimization 2017-09-22 09:34:33 +02:00
Daniele Teti
a2718115a0 Small FIX for Delphi XE6 2017-09-21 23:11:50 +02:00
Daniele Teti
121b6359e1 - Removed ContentEncoding
FIX https://github.com/danieleteti/delphimvcframework/issues/105
2017-09-08 17:00:46 +02:00
Daniele Teti
fc72c8c49b Some minor fixes.
All protected serializers methods are now public so that is possible to use the low level serialization as was possibile with the old ObjectsMappers.
2017-09-07 00:11:25 +02:00
Daniele Teti
0b9b8a01bf FIX https://github.com/danieleteti/delphimvcframework/issues/83 2017-08-29 11:54:29 +02:00
Daniele Teti
59b6208356 https://github.com/danieleteti/delphimvcframework/issues/90 2017-07-17 11:48:26 +02:00
Daniele Teti
f108357a92 FIX JWT (ported from 2.x branch (247f25e519)
SSE Sample updated
2017-07-05 00:19:38 +02:00
Daniele Teti
d6a04c89c2 3_0_0_hydrogen_RC6 2017-06-22 16:19:13 +02:00
Daniele Teti
d624535e85 ROUTER Optimization (50% faster) 2017-06-02 00:12:00 +02:00
Daniele Teti
82ef760987 REMOVED ObjectsMappers.pas (finally!) 2017-05-25 16:58:07 +02:00
Daniele Teti
ff1bc73949 ADDED an action which uses a custom serializer in sample "renders.dproj"
NEW the JsonDataObjects based serializer is the default serializer
FIX Rendering a nil value, will result in a "null" json (with the json serializers)
2017-05-18 00:38:19 +02:00
Daniele Teti
1b20254836 3.0.0 hydrogen RC2 2017-05-09 23:14:20 +02:00
Daniele Teti
a866a37b27 3.0.0 hydrogen RC1 2017-05-09 13:38:03 +02:00
Daniele Teti
96dc31e97b Added support for multiple parameter with the same name in the http standard submit. 2017-05-08 17:27:00 +02:00
Daniele Teti
4e366e5a53 Updated some demos
Added overload for Render(TDataSet)
Changed default serialization for Render(TDataSet)
2017-04-29 23:57:32 +02:00
Daniele Teti
53ecae82db TestServer OK on linux. All unit tests are ok. 2017-04-14 16:43:53 +02:00
Daniele Teti
aadceee80f Adapted to the single file for StompClient 2017-04-04 13:04:29 +02:00
Daniele Teti
fcec5e7370 FIX some demos 2017-03-30 17:00:12 +02:00
Ezequiel Juliano Müller
74f921cc76 Adding DataSets Serialization 2017-03-29 09:49:35 -03:00
Ezequiel Juliano Müller
372bf9bc13 Refactoring, standardizing names and removing unnecessary dependencies. 2017-03-23 14:51:25 -03:00
Ezequiel Juliano Müller
611f297425 Changes in unit tests 2017-03-20 17:42:28 -03:00
Ezequiel Juliano Müller
ee9659762b Refactoring and Removing Dependencies 2017-03-20 15:08:01 -03:00
Ezequiel Juliano Müller
5f34de36b1 Refactoring and Removing Dependency with SystemJSON and Mapper 2017-03-13 16:52:11 -03:00
Ezequiel Juliano Müller
d0f3961bed Add initial sample with JsonDataObjects serializer 2017-03-02 15:29:43 -03:00
Desenvolvimento
6a27680a0a Merge branch 'pluggable_mapper' of https://github.com/danieleteti/delphimvcframework into pluggable_mapper
# Conflicts:
#	sources/MVCFramework.Serializer.Commons.pas
2017-03-01 17:43:16 -03:00
Desenvolvimento
88b8e7da3c Refactoring the System JSON Serializer. Adding the serializer to JsonDataObjects. Problems with some unit tests. 2017-03-01 17:40:57 -03:00
Daniele Teti
3580d5ab5e MERGED https://github.com/danieleteti/delphimvcframework/pull/72
MERGED https://github.com/danieleteti/delphimvcframework/pull/73
2017-02-24 14:20:05 +01:00
Daniele Teti
c7c738a00e Removed RenderJSON 2017-02-22 19:50:49 +01:00
Daniele Teti
51351a6f73 removed *Strict serialization type
added TMVCSerializerStrictJSON
2017-02-13 20:51:59 +01:00