Socket
Socket
Sign inDemoInstall

angular-validated-resource

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-validated-resource - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

package.json
{
"name": "angular-validated-resource",
"version": "1.0.5",
"version": "1.0.6",
"description": "JSON Schema validation for angular resource",

@@ -5,0 +5,0 @@ "author": "Good Eggs <open-source@goodeggs.com>",

@@ -22,3 +22,2 @@ # Angular Validated Resource

require 'angular-validated-resource'
# make sure you have angular-resource required somewhere too
]

@@ -31,14 +30,17 @@

isArray: true
queryParamsSchema: require './product_schemas/query/query_params.json' # JSON schema to use for validating
responseBodySchema: require './product_schemas/query/response_body.json' # JSON schema to use for validating
queryParamsSchema: require './product_schemas/query/query_params.json'
requestBodySchema: require './product_schemas/query/request_body.json'
responseBodySchema: require './product_schemas/query/response_body.json'
move:
method: 'POST'
url: 'http://api.test.com/products/:_id/move'
params: {_id: '@_id'}
requestBodySchema: require './product_schemas/move/request_body.json' # JSON schema to use for validating
responseBodySchema: require './product_schemas/move/response_body.json' # JSON schema to use for validating
queryParamsSchema: require './product_schemas/move/query_params.json'
requestBodySchema: require './product_schemas/move/request_body.json'
responseBodySchema: require './product_schemas/move/response_body.json'
```
Note, if window.env is 'test', validation WILL NOT allow unknown fields. Otherwise, validation WILL allow unknown fields.
If window.env is 'test', validation **will not** allow unknown fields. Otherwise, validation **will** allow unknown fields.
Although not required, we strongly recommended that you validate all parts of the request (queryParams, requestBody, and responseBody) for every action, even if the validation is just checking for an empty object. This way, you will catch any unexpected data that you pass through.
## Contributing

@@ -45,0 +47,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc