Skip to content

Improve remoting metadata - Add ctor.http to SharedClass - #37

Merged
bajtos merged 1 commit into
masterfrom
feature/improve-remoting-metadata
Jan 21, 2014
Merged

Improve remoting metadata - Add ctor.http to SharedClass#37
bajtos merged 1 commit into
masterfrom
feature/improve-remoting-metadata

Conversation

@bajtos

@bajtos bajtos commented Jan 21, 2014

Copy link
Copy Markdown
Member

The SharedClass has the http property always set now. If the
ctor does not provide http.path, a default value of '/' + name is
used. This way we can decouple the REST (HTTP) routing from the model
name and make the REST path accessible from any external code.

The second part of the commit modifies ext/swagger to use this new
property.

/to: @ritch please review
/cc: @raymondfeng @Schoonology

This is the first pull requests in the upcoming series of changes that will make it super easy to generate client code from metadata provided by RemoteObjects via classes().

The SharedClass has the `http` property always set now. If the
ctor does not provide `http.path`, a default value of `'/' + name` is
used. This way we can decouple the REST (HTTP) routing from the model
name and make the REST path accessible from any external code.

The second part of the commit modifies ext/swagger to use this new
property.
@slnode

slnode commented Jan 21, 2014

Copy link
Copy Markdown

Test PASSed. To trigger a build add comment - ".test\W+please"
Refer to this link for build results: http://ci.strongloop.com/job/strong-remoting/120/

@ritch

ritch commented Jan 21, 2014

Copy link
Copy Markdown
Member

LGTM

bajtos added a commit that referenced this pull request Jan 21, 2014
Improve remoting metadata - Add ctor.http to SharedClass
@bajtos
bajtos merged commit 2b96d74 into master Jan 21, 2014
@bajtos
bajtos deleted the feature/improve-remoting-metadata branch January 21, 2014 16:17
bajtos referenced this pull request in loopbackio/loopback-datasource-juggler Jan 21, 2014
Set the HTTP route to `'/' + pluralModelName` so that we don't have
to duplicate this bit of logic in strong-remoting and other places.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants