[
https://issues.apache.org/jira/browse/ATLAS-1398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15769340#comment-15769340
]
Apoorv Naik commented on ATLAS-1398:
------------------------------------
[~svimal2106] The reason this request went through is because of the shared
attributes from AtlasBaseTypeDef. I think we need Validator rules for all sorts
of creation/update calls to make sure that the JSON is indeed valid.
> POST request for Struct type accepts Enum type in request JSON
> --------------------------------------------------------------
>
> Key: ATLAS-1398
> URL: https://issues.apache.org/jira/browse/ATLAS-1398
> Project: Atlas
> Issue Type: Improvement
> Reporter: Vimal Sharma
>
> POST v2/types/structdef
> {
> "name" : "creation_order2",
> "typeVersion" : "1.1",
> "elementDefs" : [
> {
> "ordinal" : 1,
> "value" : "PRE"
> },
> {
> "ordinal" : 2,
> "value" : "POST"
> },
> {
> "ordinal" : 3,
> "value" : "UNKNOWN"
> }
> ]
> }
> return response
> {
> "category": "STRUCT",
> "guid": "63d0755e-8e54-4f5f-9266-fa8d5df20969",
> "createTime": 1481886280574,
> "updateTime": 1481886280574,
> "version": 1,
> "name": "creation_order2",
> "description": "creation_order2",
> "typeVersion": "1.1",
> "attributeDefs": []
> }
> The response suggests that and empty Struct is created.The POST request
> should not create an empty Struct and should fail with the message "Invalid
> JSON"
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)