Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d-plaindoux/rapido
An HTTP API specification language
https://github.com/d-plaindoux/rapido
Last synced: 11 days ago
JSON representation
An HTTP API specification language
- Host: GitHub
- URL: https://github.com/d-plaindoux/rapido
- Owner: d-plaindoux
- License: lgpl-2.1
- Created: 2013-09-24T04:30:08.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-04-17T05:57:20.000Z (over 10 years ago)
- Last Synced: 2023-03-12T10:07:10.252Z (over 1 year ago)
- Language: Scala
- Homepage:
- Size: 1.14 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.txt
- License: LICENSE
Awesome Lists containing this project
README
rAPIdo
======A rest (and may be more) API design tool
## Quick overview
The *rAPIdo* project proposes a specific declarative language dedicated to client side
rest service specification. Such specification describes:
- the resource path
- the method i.e. `GET`, `HEAD` `POST`, `PUT` and `DELETE`
- the input type
- the output typeEach service can be viewed as a function applied to a triplet (path,method,input)
and produces an output as a result. Such design gives a language independent formalism
which can be generated to chosen targeted languages.```
type Error = { @get code:Int, @get reason:String }
type Address = { @{get,set} address:String? }
type Place = Address with { @{get,set} name:String }
type Places = { @get(values) places : [ Places ] }
type Nothing = {}service places [places] {
list: => Places = GET
create: Place => Place = POST BODY[Place]
}service place(Place) [places/] {
get: => Place = GET
update: Address => Nothing = PUT BODY[Address]
delete: => Nothing = DELETE
}client placesRest provides places, place
```Once such specification is done client API can be automatically generated targeting languages
like Scala, Java, Javascript, Python etc.## More resources ...
More information are available in the wiki
## License
Copyright (C)2014 D. Plaindoux.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2, or (at your option) any
later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.You should have received a copy of the GNU Lesser General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.