Sha256: 1cbb390e8ed1a80a60e9deb3cae7dc33e4ad8b08a9684c3a92bfcd31c034193f
Contents?: true
Size: 729 Bytes
Versions: 1
Compression:
Stored size: 729 Bytes
Contents
class PostsController < Lina::ApplicationController define_action :index, { name: 'Posts Index', params: { }, return: { } } do render json: { name: 'post name1' } end define_action :show, { name: 'show a post by ID', params: { required: [ :id ], properties: { id: { type: 'integer' }, } }, return: { } } do render json: { name: "post with: #{params[:id]}" } end define_action :update, { name: 'update the post by ID', params: { required: [ :id ], properties: { id: { type: 'integer' }, } }, return: { } } do render json: { id: params[:id] } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lina-0.0.1 | test/dummy/app/controllers/posts_controller.rb |