-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
Empty file.
4 changes: 4 additions & 0 deletions
4
repository/Seaside-REST-Examples.package/WAJsonAPIExample.class/class/register.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
registration | ||
register | ||
|
||
WAAdmin register: self at: 'examples/jsonapi' |
14 changes: 14 additions & 0 deletions
14
repository/Seaside-REST-Examples.package/WAJsonAPIExample.class/instance/getClass..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
json api | ||
getClass: aClassName | ||
|
||
<get> | ||
<path: '/classes/{className}'> | ||
<produces: 'application/json'> | ||
|
||
^ WAJsonCanvas builder render: [ :json | | ||
json array: [ | ||
Smalltalk allClasses do:[ :class | | ||
json object: [ | ||
json | ||
key: 'name' value: class name; | ||
key: 'package' value: class package name ] ] ] ] |
14 changes: 14 additions & 0 deletions
14
repository/Seaside-REST-Examples.package/WAJsonAPIExample.class/instance/getClasses.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
json api | ||
getClasses | ||
|
||
<get> | ||
<path: '/classes/'> | ||
<produces: 'application/json'> | ||
|
||
^ WAJsonCanvas builder render: [ :json | | ||
json array: [ | ||
Smalltalk allClasses do:[ :class | | ||
json object: [ | ||
json | ||
key: 'name' value: class name; | ||
key: 'package' value: class package name ] ] ] ] |
14 changes: 14 additions & 0 deletions
14
repository/Seaside-REST-Examples.package/WAJsonAPIExample.class/instance/getPackages.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
json api | ||
getPackages | ||
|
||
<get> | ||
<path: '/packages/'> | ||
<produces: 'application/json'> | ||
|
||
^ WAJsonCanvas builder render: [ :json | | ||
json array: [ | ||
Smalltalk packages do:[ :package | | ||
json object: [ | ||
json | ||
key: 'name' value: package name; | ||
key: 'classes' value: [ json render: (package classes collect: [ :class | class name ]) ] ] ] ] ] |
11 changes: 11 additions & 0 deletions
11
repository/Seaside-REST-Examples.package/WAJsonAPIExample.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "WARestfulHandler", | ||
"category" : "Seaside-REST-Examples", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "WAJsonAPIExample", | ||
"type" : "normal" | ||
} |
2 changes: 1 addition & 1 deletion
2
repository/Seaside-REST-Examples.package/monticello.meta/categories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SystemOrganization addCategory: #'Seaside-REST-Examples'! | ||
self packageOrganizer ensurePackage: #'Seaside-REST-Examples' withTags: #()! |
2 changes: 0 additions & 2 deletions
2
repository/Seaside-REST-Examples.package/monticello.meta/version
This file was deleted.
Oops, something went wrong.