Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: Support "type" key in sub-properties in 3.x #1700

Merged
merged 1 commit into from
Mar 19, 2019

Conversation

hacksparrow
Copy link
Contributor

Description

Currently, a model definition like this:

  "properties": {
    "items": {
      "type" : {
        "itemname": { "type": "string"},
        "type": { "type": "string" }
      }
    }
  }

results in invalid data.

{ items: [object Object] }

It is caused by the sub-property type conflicting with the type resolution object.

This PR, allows sub-property type to be used without any problem.

Related issues

strongloop/loopback#4131

Checklist

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

@bajtos
Copy link
Member

bajtos commented Mar 14, 2019

Is this a back-port of #1693? Was the back-port trivial, or did you have to make any significant changes?

@dhmlau
Copy link
Member

dhmlau commented Mar 14, 2019

Seems to be a backport.. the changes are the same as #1693.

@hacksparrow
Copy link
Contributor Author

@bajtos it was a trivial backport.

@hacksparrow hacksparrow merged commit 16ffd42 into 3.x Mar 19, 2019
@bajtos bajtos deleted the 3x/type-sub-property branch March 19, 2019 13:50
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants