Refactor the way how loopback types are converted to swagger data types.
- `modelHelper.LDLPropToSwaggerDataType` is responsible for
producing a valid Swagger Data Type object from LDL object
(be it a property, accepts item or returns item).
- LDLPropToSwaggerDataType picks only fields that are part
of the swagger spec, everything else is excluded from the result.
It's up to the caller to add extra fields like `description`.
- refactor `routeHelper.extendWithType` to accept an additional arg:
the original LDL object. This way it's possible to copy all
type-specific fields to the output object and don't add anything
else.
* upstream/master:
Sort endpoints by letter.
Add syntax highlighting styles & highlight threshold.
Add contribution guidelines
Bump version
Fix how the array of models is iterated
Bump version
Make sure nested/referenced models in array are mapped to swagger
Make sure nested/referenced models are mapped to swagger
Bump version
Newest Swagger UI requires application/x-www-form-urlencoded.
Use `dist` property from swagger-ui package.
Fixed undefined modelClass when using polymorphic relations
Bump version
Fix the type name for a property if model class is used
Conflicts:
lib/model-helper.js
lib/swagger.js
public/css/loopbackStyles.css
* upstream/master:
Bump version
Set up default consumes/produces media types
Fix the default opts
Add required swagger 1.2 items property for property type array
Allow passing a custom protocol.
Conflicts:
lib/swagger.js
This completes the migration of swagger processing from strong-remoting
into loopback-explorer.
Added additional usage instructions to README and additional testing.
This commit introduces a change into where resource descriptors
are hosted. They are no longer hosted under /swagger, but instead
under the same path as the Explorer, wherever that may be.
Generally, the resource listing will be available at
/explorer/resources, and api listings under
/explorer/resources/{modelName}.