擅长:python、mysql、java
<p>报告指出:</p>
<blockquote>
<p>By default, providing additional properties is valid:</p>
<p>The additionalProperties keyword is used to control the handling of
extra stuff, that is, properties whose names are not listed in the
properties keyword. By default any additional properties are allowed.</p>
<p>The additionalProperties keyword may be either a boolean or an object.
If additionalProperties is a boolean and set to false, no additional
properties will be allowed.</p>
<p>Reusing the example above, but this time setting additionalProperties
to false.</p>
</blockquote>
<p>因此,尝试将其添加到<code>query_schema</code>中:</p>
<pre><code>query_schema = {
"type": "object",
"properties" : {
"pltfrm_nm": {"type" : "string"},
"srvr_nm": {"type": "string"},
"db_nm": {"type": "string"},
"tbl_nm": {"type": "string"},
"ip_addr_id": {"type": "string"},
"usr_id": {"type": "string"},
"sql_txt": {"type": "string"},
"timestmp": {"type": "string"},
},
"additionalProperties": False
}
</code></pre>