Skip to content

css-delphi/HorseGenerics

 
 

Repository files navigation

Horse Generics

Publishes an [GET PUT POST DELETE] API easily to a list of <T> classes using generics and Horse

Motivation

With basic infrastructure of HORSE {AUTHENTICATION} {JSON} {EXCEPTION} Create a new endpoint with one line of code for a model = Class

How it works

Use Generic Controller TApiController to create [GET PUT POST DELETE] routes in your API

class function Dominios.Publish: String;

begin
  TApiController<TConsulta>.Publicar('/consulta');
  TApiController<TMedicao>.Publicar('/medicao');
end;

It returns

GET /consulta/
GET /consulta/:codigo
POST /consulta/
PUT /consulta/:codigo
DELETE /consulta/:codigo

Requires

Horse https://github.com/HashLoad/horse

Dataset.Serialize https://github.com/viniciussanchez/dataset-serialize

Ricardo Rocha pinned projects https://github.com/ricardodarocha/

https://github.com/ricardodarocha/RttiInterceptor

https://github.com/ricardodarocha/EntityMapper

https://github.com/ricardodarocha/SqlExtrator

About

Publish an [GET PUT POST DELETE] API easily to a list of <T> classes using generics and Horse

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Pascal 100.0%