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

Adding enforce restrictions option #203

Merged
merged 1 commit into from
Jan 22, 2019

Conversation

romeupalos
Copy link

@romeupalos romeupalos commented Dec 21, 2018

Description

This change creates an option to enforce the restriction options in the XML schema in the strong-soap client.
It's useful in test environments to catch possible bugs that would only show up in production when the server side is validating the input request.

After the commit, it's possible to set the client to enforce the following XML restrictions:

  • enumeration
  • fractionDigits
  • length
  • maxExclusive
  • maxInclusive
  • maxLength
  • minExclusive
  • minInclusive
  • minLength
  • pattern
  • totalDigits
  • whiteSpace

Related issues

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style
    guide

@slnode
Copy link

slnode commented Dec 21, 2018

Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."

@romeupalos romeupalos force-pushed the enforce-restrictions branch 2 times, most recently from 3d9bcca to d92701d Compare December 21, 2018 17:49
@dhmlau
Copy link
Member

dhmlau commented Jan 21, 2019

@romeupalos , thanks for your PR. Could you please fix the commit message? Here is the commit linter error:

**  Linting commit logs
**
**  1 problems found:
**    d92701d - Adding enforce restrictions option: line 3 longer than 72 characters.

Please refer to our commit message guideline: https://loopback.io/doc/en/contrib/git-commit-messages.html. Thanks!

Just wondering... did you extract the message to messages.json by running slt-globalize -e against this repo? I'd like to make sure the string is properly extracted.

Support to enforce the following XML restrictions:
 - enumeration
 - fractionDigits
 - length
 - maxExclusive
 - maxInclusive
 - maxLength
 - minExclusive
 - minInclusive
 - minLength
 - pattern
 - totalDigits
 - whiteSpace
@romeupalos
Copy link
Author

Hello @dhmlau,
I fixed the commit message.. sorry I didn't realize it was not compliant with the guideline.
Also I didn't use strong-globalize at first... great project.
Now I've extracted the message with it... It seems a intl/zz folder was created... is it intended to be committed?

Please, let me know if I need to change anything else.

Copy link
Contributor

@raymondfeng raymondfeng left a comment

Choose a reason for hiding this comment

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

Great contribution!

@raymondfeng raymondfeng merged commit 723aa16 into loopbackio:master Jan 22, 2019
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

4 participants