Commit Graph

713 Commits

Author SHA1 Message Date
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
João Antônio Duarte
2aeb322f55 Merge remote-tracking branch 'upstream/master' into middleware_etag 2020-04-24 15:07:29 -03:00
Daniele Teti
1e4d374101 Comepleted ObjectDict support - fixed ncCamelCase mangling 2020-04-24 16:36:18 +02: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
João Antônio Duarte
b4272f98f2 Merge remote-tracking branch 'upstream/master' into middleware_etag 2020-04-23 19:47:02 -03:00
Daniele Teti
e0fb181d19 Updated ArticlesCrud sample to use ObjectDict
Improved DataSetUtils
2020-04-23 17:20:53 +02:00
João Antônio Duarte
0186b0c4b2 Middleware changed to generate ETag header of static files 2020-04-22 19:18:39 -03:00
João Antônio Duarte
5a000d42e8 Added ETag Middleware 2020-04-22 16:45:56 -03:00
Daniele Teti
dd64ab4c49 Completed ObjectDict tests 2020-04-21 17:04:04 +02:00
Daniele Teti
c075b1fbca Now ObjectDict() returns an interface - allows easily pattern for rendering complex objects 2020-04-20 18:32:46 +02:00
Daniele Teti
d261edb622 Added ncPascalCase, improved ncCamelCase support, improved DataSet Serialization 2020-04-20 17:56:17 +02:00
Daniele Teti
08f01e6633 https://github.com/danieleteti/delphimvcframework/issues/366 2020-04-19 12:23:55 +02:00
Daniele Teti
f853b362b3 https://github.com/danieleteti/delphimvcframework/issues/362 2020-04-18 23:32:24 +02:00
Daniele Teti
fc525e9d97 https://github.com/danieleteti/delphimvcframework/issues/363 2020-04-18 15:04:27 +02:00
Daniele Teti
72fbb7d8f2 v3_2_0_boron_RC6 2020-04-14 13:17:09 +02:00
Daniele Teti
26b82080d9 https://github.com/danieleteti/delphimvcframework/issues/330 2020-04-13 16:22:15 +02:00
Daniele Teti
e437d33434 https://github.com/danieleteti/delphimvcframework/issues/355 2020-04-12 12:38:00 +02:00
Vitao-Jose
26a507748b
Update MVCFramework.Controllers.CacheController.pas
Line 191 - change 
if not String.IsNullOrWhiteSpace(lConnection) then 
by 
if not String.IsNullOrWhiteSpace(lKeyAuth) then
2020-04-11 01:11:34 -03:00
Daniele Teti
bddca2f9b2 Merge branch 'master' of https://github.com/danieleteti/delphimvcframework 2020-04-09 17:01:51 +02:00
Daniele Teti
3c2c7e600e Better exception messages for deserialization errors 2020-04-09 17:01:33 +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
0a80e649b7 SessionCustomData and Context.LoggedUser are filled also for public endpoint if the request contains a valid jwt 2020-04-09 13:02:08 +02:00
Daniele Teti
e56fb272a9 https://github.com/danieleteti/delphimvcframework/issues/348
Just for PostgreSQL
2020-04-08 18:04:45 +02: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
f99590f50f https://github.com/danieleteti/delphimvcframework/issues/350 2020-04-02 19:26:04 +02:00
Daniele Teti
2273c88b00 Added MediaTypes TMVCMediaType.IMAGE_X_ICON 2020-04-02 15:28:06 +02:00
Sandro Borges
1052769b54 Added authentication key for redis connection 2020-04-02 09:41:33 -03:00
Daniele Teti
d577221a71 Now ActiveRecord PrimaryKey can be string, nullablestring, integer, nullableinteger, int64, nullableint64 2020-03-31 16:23:22 +02:00
Daniele Teti
841edeb114 https://github.com/danieleteti/delphimvcframework/issues/349
https://github.com/danieleteti/delphimvcframework/issues/38
2020-03-31 00:47:35 +02:00
Daniele Teti
1fd7740048 Added JSONRPC Hooks - Renamed RenderXXX Methods 2020-03-30 13:30:45 +02:00
Daniele Teti
5fb572ca63 Support for non autogenerated primary keys 2020-03-27 00:37:28 +01:00
Daniele Teti
d00f8e6206 Improved JSONRPC Exceptions 2020-03-25 22:27:29 +01:00
Daniele Teti
99664f141b Refactoring of some internals structures of TMVCActiveRecord 2020-03-25 11:35:25 +01:00
Daniele Teti
f4e27a2179 Added JSONRPC HOOKS 2020-03-24 17:55:25 +01:00
João Antônio Duarte
e844b7a42e Correction of the JWT authentication endpoint definition in TMVCMiddlewareSwagger. Username and passoword definition headers cannot be required. 2020-03-23 20:42:58 -03:00
Daniele Teti
71b6108149 Improved deserialization in cases of derived properties 2020-03-23 18:51:57 +01:00
Daniele Teti
6e1978791f First public version of TMVCAPIBinder 2020-03-20 23:08:45 +01:00
João Antônio Duarte
cd162c5977 Exception handling when receiving value that does not exist in the mapped values.
Search for mapped values case insensitive
2020-03-13 11:58:04 -03:00
João Antônio Duarte
12fcc9b8b4 Warnings removal 2020-03-12 17:19:30 -03:00
Daniele Teti
406ee139fd Renamed "MVCEnumSerializationTypeAttribute" to "MVCEnumSerializationAttribute"
Added "DataTypeName" in MVCActiveRecord to better use specific RDBMS types (e.g. JSON / JSONP data type in PostgreSQL)
2020-03-12 20:37:48 +01:00
João Antônio Duarte
25d2a909ef Added ability to serialize/desserialize types enumerated by an array of mapped values 2020-03-12 14:24:20 -03:00
Andrea Ciotti
2bb620bec2 DataSetToJsonObject serializer: Added TFieldType.ftWord to the list of types to be serialized 2020-03-11 09:03:30 +01:00
Daniele Teti
36c2a2201e Nullable Templates 2020-03-11 01:35:31 +01:00
Daniele Teti
2c6552276e https://github.com/danieleteti/delphimvcframework/issues/336 2020-03-08 19:35:17 +01:00
Daniele Teti
ab2c92c26f https://github.com/danieleteti/delphimvcframework/issues/338 2020-03-08 17:54:10 +01:00
Daniele Teti
ac9f3bc7f6 FIX https://github.com/danieleteti/delphimvcframework/issues/334 2020-03-05 18:34:00 +01:00
Daniele Teti
f99aa89fda Added more characters in URL_MAPPED_PARAMS_ALLOWED_CHARS = ' àèéùòì''"@\[\]\{\}\(\)\=;&#\.:!\_\/,%\w\d\x2D\x3A';
Added more unit tests
2020-03-04 19:56:01 +01:00
Daniele Teti
cb46414e4d https://github.com/danieleteti/delphimvcframework/issues/321 2020-02-28 18:33:28 +01:00
Daniele Teti
70a5b2c306 Updated README.md 2020-02-26 13:25:00 +01: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
c919faa1e3
Merge pull request #328 from joaoduarte19/rql_bugfix
Rql bugfix
2020-02-22 16:51:29 +01:00
João Antônio Duarte
3218492a6c Correction when converting TField ftGUID to property TGUID in Delphi 10.1 Berlin
Removal of warnings in Delphi 10.1 Berlin
2020-02-21 16:14:15 -03:00
João Antônio Duarte
28b8f02c43 Merge remote-tracking branch 'upstream/master' into rql_bugfix 2020-02-13 20:15:55 -03:00
João Antônio Duarte
e83fcac362 Fixed error in the RQL compiler when passing a string containing the apostrophe (') symbol in the "contains" and "in" operators 2020-02-13 20:15:25 -03:00
Daniele Teti
92dcbd8b40 FIXED a Vulnerability bug which affects some deployment configurations. 2020-02-13 23:33:30 +01:00
Daniele Teti
c36cd13988 3.2.0-boron-RC4 2020-02-05 23:46:38 +01:00
Daniele Teti
4a78322aef Improvement is Nullable primary keys. Added method "Store" 2020-02-03 13:19:55 +01:00
Daniele Teti
42cf51b595 All serialization/deserialization unittests pass for nullables!! :-) 2020-02-03 12:11:42 +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
23b3826f02 Fixed WineCellar* samples (thank you Stephen) 2020-01-08 20:34:02 +01:00
Daniele Teti
4eb5444cb6 Added sequence support fo mvcactiverecord (required for interbase, optional for other dbms) 2020-01-08 15:30:10 +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
João Antônio Duarte
64d9936784 Added EnumValues parameter to MVCSwagParamAttribute attribute. When adding an enum, swagger will display a list of possible values to select 2020-01-03 18:08:47 -03:00
João Antônio Duarte
996c1344c7 improved path ordering
Added DefaultValue parameter to MVCSwagParamAttribute attribute
2020-01-03 17:47:01 -03:00
João Antônio Duarte
4c60e67a3e Added ordering of paths by tags 2020-01-03 16:49:53 -03:00
João Antônio Duarte
7222b19003 Json schemas moved to Definitions section 2020-01-03 15:48:22 -03:00
Daniele Teti
7c89df545d Middleware Trace 2019-12-23 18:37:28 +01:00
Daniele Teti
e2f6bd76d4 https://github.com/danieleteti/delphimvcframework/issues/312 2019-12-23 18:35:21 +01:00
Daniele Teti
09c7634001
Merge pull request #314 from landrix/master
SSL-server-support for TMVCListener
2019-12-23 17:34:07 +01:00
Daniele Teti
519d607b90 Added a NOTE field in all ActiveRecordDB - the sample has been updated as well 2019-12-23 10:35:36 +01:00
Sven Harazim
ed3757ac52 SSL-server-support for TMVCListener 2019-12-19 10:39:13 +01:00
Daniele Teti
fdcb617801 Improved error messages for ActiveRecord 2019-12-17 17:34:23 +01:00
Daniele Teti
3793a42b5d Improved router ACCEPT resolution - Improved MSSQLServer support for nvarchar(max) data type 2019-12-17 14:52:11 +01:00
Daniele Teti
57da1259d8 MVCAREntitiesGenerator can optionally register all the generated entities also in the ActiveRecordMappingRegistry (Thanks to [Fabrizio Bitti](https://twitter.com/fabriziobitti) from [bit Time Software](http://www.bittime.it)) 2019-11-28 19:04:26 +01:00
Daniele Teti
9b57586dd4 Added ConfigHTTPClient in MVCJSONRPCExecutor 2019-11-28 00:19:27 +01:00
João Antônio Duarte
dfa619f14f
Merge pull request #304 from joaoduarte19/swagger_improvements
Swagger Improvements
2019-11-27 16:31:06 -03:00
João Antônio Duarte
00bb4c6e21 Added MVCSwagIgnorePathAttribute attribute to allow hiding endpoints in swagger documentation 2019-11-27 16:27:07 -03:00
Daniele Teti
7552fb6c15 Added Map* methods to TMVCActiveRecord. Improved DataSet serialization for JsonDataObjects. 2019-11-27 19:04:06 +01:00
Mauricio Montuori
e088a0555e Added Login Parameters to Swagger Documentation 2019-11-18 22:49:10 -03:00
Daniele Teti
aa93aecbaf
Merge pull request #295 from poyop/master
Send error 400 when a parameter is wrong
2019-11-18 19:38:32 +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
Daniel Sonda
f339b45ae2 #293 Fix error "[dcc32 Error] MVCFramework.Swagger.Commons.pas(376): E2029 Statement expected but 'VAR' found" 2019-11-18 13:46:30 -03:00
Daniele Teti
157c7208f1 Improved Nullable Types sample 2019-11-17 12:36:27 +01:00
João Antônio Duarte
ebfa1b806d Merge branch 'master' of https://github.com/danieleteti/delphimvcframework 2019-11-14 15:06:07 -03:00
Daniele Teti
529b5c7850 Added comments on jsonrpc/describe output 2019-11-06 20:42:17 +01:00
Daniele Teti
ff38df326d Added class helper for TJsonObject - new method LoadFromString 2019-11-06 15:08:29 +01:00
Daniele Teti
6297195a5f Fixed FirebirdSQL generator to work with transient fields with no name 2019-11-05 16:57:22 +01:00
Daniele Teti
23a108896c JSON properties can be de/serialized verbatim by the default json serializer 2019-11-05 14:40:39 +01:00
Daniele Teti
7ce87edb51 dmvcframework 3.2.0-boron 2019-11-03 16:18:24 +01:00
João Antônio Duarte
76e93957cc Merge branch 'master' of https://github.com/danieleteti/delphimvcframework 2019-10-31 14:03:33 -03:00
João Antônio Duarte
13514923d3 Added custom serializers for Spring4D nullable types 2019-10-31 08:44:57 -03:00
João Antônio Duarte
81bcb82f8f Improved methods for understanding a class as a list.
Swagger PathID renamed to OperationID. This modification had been made in commit 51b0efdba4, but had been reversed with the latest swagger changes.
2019-10-31 08:31:41 -03:00
João Antônio Duarte
74ff994fdf Minor improvements in JSONSchema generation 2019-10-30 15:07:14 -03:00
João Antônio Duarte
127025ae55 Added attribute to define authentication type of controller or method. Improvements and fixes in JSON Schema generation from entity
Added support for defining array JSON Schemas for parameters and responses
2019-10-30 12:02:30 -03:00
Daniele Teti
51b0efdba4 Swagger PathID renamed to OperationID
Moved MVCRequiresAuthenticationAttribute into MVCFramework.pas
2019-10-30 00:25:01 +01:00
Daniele Teti
3ccd6b6122 DMVCFramework package includes SwaggerDoc code. 2019-10-24 15:35:39 +02:00
João Antônio Duarte
db9cb7406b Added support for deserialize generic lists without MVCListOf attribute
Unit Tests Added
2019-10-14 18:11:08 -03:00
Daniele Teti
cf3839ef25 Changed exception message text in JSON-RPC client to better identify remote exceptions 2019-10-11 00:32:41 +02:00
Daniele Teti
6bdf5547bc Added ToMVCList to wrap any object and try to use as list 2019-10-10 20:16:48 +02:00
Daniele Teti
b0ccc9a974
Merge pull request #276 from joaoduarte19/serialize_interfaces
Serialization for interfaces
2019-10-10 19:21:47 +02:00
João Antônio Duarte
005be2807d Added JWTDescription parameter to Swagger middleware to provide a custom description for JWT authentication. 2019-10-10 08:32:00 -03: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
8dc7d98a14
Merge branch 'master' into serialization_enums 2019-10-10 00:02:02 +02:00
Daniele Teti
510453576f Added credits to the readme
Fixed https://github.com/danieleteti/delphimvcframework/issues/278
2019-10-09 23:47:07 +02:00
Daniele Teti
0d93ace653 v3.2 (boron) RC1 2019-10-09 23:24:08 +02:00
Daniele Teti
75e7f79257
Merge pull request #253 from joaoduarte19/middlewareswagger_dev
Added Swagger support
2019-10-09 23:19:45 +02:00
Daniele Teti
7997391212 TDataSetHolder.Items -> data
Added new custom serializer for TDataSetHolder
2019-09-30 00:06:23 +02:00
João Antônio Duarte
6a88ff38db Merge remote-tracking branch 'upstream/master' into serialization_enums 2019-09-25 11:43:22 -03: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
João Duarte
3216932341 Merge remote-tracking branch 'upstream/master' into middlewareswagger_dev 2019-09-25 11:32:21 -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
Daniele Teti
701418e994 Added SerializationCallback to TMVCJsonDataObjectSerializer 2019-09-25 09:14:09 +02:00
João Duarte
530edca638 Added overload to render method for types Iinterfaces 2019-09-18 11:53:54 -03:00
João Duarte
ef64fbaa55 Improvement to serialize nested interfaces 2019-09-18 08:30:50 -03:00
João Duarte
a184165e47 * Serialization for interfaces
Added support for serialization of interface instances
Added unit test
2019-09-17 20:14:54 -03:00
Daniele Teti
698f34354c Added ResponseCreated, ResponseNoContent, ResponseAccepted 2019-09-01 20:36:36 +02:00
Daniele Teti
b58d9ba22a https://github.com/danieleteti/delphimvcframework/issues/263 2019-09-01 12:15: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
Daniele Teti
f86cbcece0 TRESTClient.BasicAuthentication is enabled if UserName <> '' 2019-08-23 12:12:38 +02:00
Daniele Teti
0152d0aac9 FIX https://github.com/danieleteti/delphimvcframework/issues/270 2019-08-23 12:01:33 +02:00
João Antônio Duarte
aeb82ebb63 attribute naming improvement 2019-08-13 15:55:51 -03:00
João Antônio Duarte
a354a80032 improved exception returns 2019-08-13 11:57:42 -03:00
João Antônio Duarte
47a5c35560 Basic Authorization Header Decoding Improvements 2019-08-13 11:50:56 -03: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
João Antônio Duarte
fd0e8a23e0 Added serialization support for enumerations like Enumeration Name or Enumeration Ordinality 2019-08-12 16:51:12 -03:00
João Antônio Duarte
f5d611e432 Bug fixes 2019-08-08 18:36:19 -03:00
Geoffrey Smith
e83f025b09 Merge remote-tracking branch 'joaoduarte1/middlewareswagger_dev' into SwagDoc 2019-08-06 11:01:57 +10:00
Geoffrey Smith
239486cce2 Re-order functions so inline can work 2019-08-06 10:54:45 +10:00
João Antônio Duarte
a8303809b8 Merge branch 'master' of https://github.com/danieleteti/delphimvcframework into middlewareswagger_dev 2019-08-05 14:36:06 -03:00
João Antônio Duarte
2856063fd8 corrections in duplicate mappings 2019-08-05 11:59:35 -03:00
Geoffrey Smith
0d4b82eac3 Add JsonFieldFromRttiTypeInfo to simplify various methods 2019-08-06 00:25:30 +10:00
Geoffrey Smith
b6c75d2a5a Use Constructor parameter to pass in status info 2019-08-06 00:18:39 +10:00
Geoffrey Smith
c54c157dc7 Update Swagger Controller 2019-08-05 21:37:42 +10:00
Daniele Teti
44deb6ce83 Removed some hints for old version of Delphi 2019-08-05 12:55:57 +02:00
Geoffrey Smith
b793d5b65e Change MVCPathParam parameters to have Pattern instead of description 2019-08-03 14:26:57 +10:00