[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation only content negotiation significant headers for value match #53

Merged
merged 10 commits into from
Mar 12, 2015

Conversation

netmilk
Copy link
Contributor
@netmilk netmilk commented Feb 24, 2015
  • Headers validated for match of value given in expected are:
[
  'content-type'
  'accept'
  'accept-charset'
  'accept-encoding'
  'accept-language'
]
  • All other headers are validated only for their presence, so values is are validated.
  • All dependencies updated to latest
  • Better handling primitive types on root level in JSON example validation
    • Strings in JSONs on root level were causing exception
    • On the root level was validated only typo of array or object
    • All JSON primitive types are now always validated on JSON root level

@@ -51,7 +51,7 @@ class JsonSchema

if typeof @schema == 'string'
try
@schema = JSON.parse(schema)
@schema = JSON.parse(@schema)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

- Strings in JSONs on root level were causing exception
- On the root level was validated only typo of array or object
- All JSON primitive types are now always validated on JSON root level
@netmilk
Copy link
Contributor Author
netmilk commented Mar 11, 2015

Have a look at IANA's list of standard headers

assert.deepEqual realOutput, expectedOutput
catch error
catch error
callback.fail "Output of code buffer does not equal. Expected output:\n" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing explicit return

kuba-kubula added a commit that referenced this pull request Mar 12, 2015
Validation only content negotiation significant headers for value match
@kuba-kubula kuba-kubula merged commit e632446 into master Mar 12, 2015
@kuba-kubula kuba-kubula deleted the netmilk/dynamic-header-values branch March 12, 2015 10:38
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.

None yet

2 participants