Skip to content

Support Object type#694

Closed
krhubert wants to merge 1 commit intodevfrom
feature/object-type
Closed

Support Object type#694
krhubert wants to merge 1 commit intodevfrom
feature/object-type

Conversation

@krhubert
Copy link
Copy Markdown
Contributor

@krhubert krhubert commented Jan 13, 2019

TODO:

  • write tests (manual tests passes even with nested array objects)
{
  "message": ["a", "b"],
  "myobj": {
    "x1": "string",
    "x2": 1 
  },
  "myobjarr": [{
    "x1": {
      "x1": "string",
      "x2": 1 
    },
    "x2": 1 
  }]
}
  • @NicolasMahe can you help with schema.json (how to tell that object type must be definitions/parameters - "$ref": "#/definitions/parameters" ?

  • figure out better name for defParametersMapToService

  • Object map[string]*Parameter hash:"name:7" - i don't like that hash with number 7 is inside type, move object to last position in struct

  • better error messages for nested objects in parameter warning.

@antho1404
Copy link
Copy Markdown
Member

antho1404 commented Jan 13, 2019

I was working on that feature too yesterday evening, I have few differences:

  • not using the defParametersMapToService function
  • not doing the loop in the validation of the object but instead use the validateParametersSchema function
  • I had to change the signature of validateType with a list of warnings instead of one warning only

If you want to have a look at it either if fine to merge or to help you work on this PR.

My version: #696

@krhubert
Copy link
Copy Markdown
Contributor Author

Close in favor of #696, as it's more complete

@krhubert krhubert closed this Jan 13, 2019
@NicolasMahe NicolasMahe deleted the feature/object-type branch January 14, 2019 03:41
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.

2 participants