Updated keywords to be aligned with website https://developer.salesfo… (#7522)

* Updated keywords to be aligned with website https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_reserved_words.htm

* [samples] Regenerate

Co-authored-by: Jim Schubert <james.schubert@gmail.com>
This commit is contained in:
henryh-force 2020-10-05 09:00:23 -04:00 committed by GitHub
parent 8c17a01bda
commit e9c6d65f2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 50 deletions

View File

@ -64,6 +64,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<li>begin</li> <li>begin</li>
<li>bigdecimal</li> <li>bigdecimal</li>
<li>blob</li> <li>blob</li>
<li>boolean</li>
<li>break</li> <li>break</li>
<li>bulk</li> <li>bulk</li>
<li>by</li> <li>by</li>
@ -77,7 +78,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<li>commit</li> <li>commit</li>
<li>const</li> <li>const</li>
<li>continue</li> <li>continue</li>
<li>convertcurrency</li>
<li>currency</li> <li>currency</li>
<li>date</li> <li>date</li>
<li>datetime</li> <li>datetime</li>
@ -86,6 +86,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<li>delete</li> <li>delete</li>
<li>desc</li> <li>desc</li>
<li>do</li> <li>do</li>
<li>double</li>
<li>else</li> <li>else</li>
<li>end</li> <li>end</li>
<li>enum</li> <li>enum</li>
@ -99,7 +100,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<li>float</li> <li>float</li>
<li>for</li> <li>for</li>
<li>from</li> <li>from</li>
<li>future</li>
<li>global</li> <li>global</li>
<li>goto</li> <li>goto</li>
<li>group</li> <li>group</li>
@ -113,13 +113,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<li>insert</li> <li>insert</li>
<li>instanceof</li> <li>instanceof</li>
<li>int</li> <li>int</li>
<li>integer</li>
<li>interface</li> <li>interface</li>
<li>into</li> <li>into</li>
<li>join</li> <li>join</li>
<li>last_90_days</li>
<li>last_month</li>
<li>last_n_days</li>
<li>last_week</li>
<li>like</li> <li>like</li>
<li>limit</li> <li>limit</li>
<li>list</li> <li>list</li>
@ -128,10 +125,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<li>map</li> <li>map</li>
<li>merge</li> <li>merge</li>
<li>new</li> <li>new</li>
<li>next_90_days</li>
<li>next_month</li>
<li>next_n_days</li>
<li>next_week</li>
<li>not</li> <li>not</li>
<li>null</li> <li>null</li>
<li>nulls</li> <li>nulls</li>
@ -150,16 +143,14 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<li>public</li> <li>public</li>
<li>retrieve</li> <li>retrieve</li>
<li>return</li> <li>return</li>
<li>returning</li>
<li>rollback</li> <li>rollback</li>
<li>savepoint</li>
<li>search</li>
<li>select</li> <li>select</li>
<li>set</li> <li>set</li>
<li>short</li> <li>short</li>
<li>sobject</li>
<li>sort</li> <li>sort</li>
<li>stat</li>
<li>static</li> <li>static</li>
<li>string</li>
<li>super</li> <li>super</li>
<li>switch</li> <li>switch</li>
<li>synchronized</li> <li>synchronized</li>
@ -167,28 +158,22 @@ These options may be applied as additional-properties (cli) or configOptions (pl
<li>testmethod</li> <li>testmethod</li>
<li>then</li> <li>then</li>
<li>this</li> <li>this</li>
<li>this_month</li>
<li>this_week</li>
<li>throw</li> <li>throw</li>
<li>time</li> <li>time</li>
<li>today</li>
<li>tolabel</li>
<li>tomorrow</li>
<li>transaction</li> <li>transaction</li>
<li>trigger</li> <li>trigger</li>
<li>true</li> <li>true</li>
<li>try</li> <li>try</li>
<li>type</li>
<li>undelete</li> <li>undelete</li>
<li>update</li> <li>update</li>
<li>upsert</li> <li>upsert</li>
<li>using</li> <li>using</li>
<li>virtual</li> <li>virtual</li>
<li>void</li>
<li>webservice</li> <li>webservice</li>
<li>when</li> <li>when</li>
<li>where</li> <li>where</li>
<li>while</li> <li>while</li>
<li>yesterday</li>
</ul> </ul>
## FEATURE SET ## FEATURE SET

View File

@ -98,22 +98,19 @@ public class ApexClientCodegen extends AbstractApexCodegen {
// https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_reserved_words.htm // https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_reserved_words.htm
setReservedWordsLowerCase( setReservedWordsLowerCase(
Arrays.asList("abstract", "activate", "and", "any", "array", "as", "asc", "autonomous", Arrays.asList("abstract", "activate", "and", "any", "array", "as", "asc", "autonomous",
"begin", "bigdecimal", "blob", "break", "bulk", "by", "byte", "case", "cast", "begin", "bigdecimal", "blob", "boolean", "break", "bulk", "by", "byte", "case", "cast",
"catch", "char", "class", "collect", "commit", "const", "continue", "catch", "char", "class", "collect", "commit", "const", "continue",
"convertcurrency", "currency", "date", "datetime", "decimal", "default", "delete", "desc", "do", "else", "currency", "date", "datetime", "decimal", "default", "delete", "desc", "do", "double", "else",
"end", "enum", "exception", "exit", "export", "extends", "false", "final", "end", "enum", "exception", "exit", "export", "extends", "false", "final",
"finally", "float", "for", "from", "future", "global", "goto", "group", "having", "finally", "float", "for", "from", "global", "goto", "group", "having",
"hint", "if", "implements", "import", "in", "inner", "insert", "instanceof", "int", "hint", "if", "implements", "import", "in", "inner", "insert", "instanceof", "int", "integer",
"interface", "into", "join", "last_90_days", "last_month", "last_n_days", "interface", "into", "join", "like", "limit", "list", "long", "loop", "map", "merge", "new",
"last_week", "like", "limit", "list", "long", "loop", "map", "merge", "new", "not", "null", "nulls", "number", "object", "of", "on", "or", "outer", "override", "package", "parallel",
"next_90_days", "next_month", "next_n_days", "next_week", "not", "null", "nulls", "pragma", "private", "protected", "public", "retrieve", "return",
"number", "object", "of", "on", "or", "outer", "override", "package", "parallel", "rollback", "select", "set", "short", "sObject", "sort", "static", "string",
"pragma", "private", "protected", "public", "retrieve", "return", "returning", "super", "switch", "synchronized", "system", "testmethod", "then", "this",
"rollback", "savepoint", "search", "select", "set", "short", "sort", "stat", "throw", "time", "transaction", "trigger", "true", "try", "undelete", "update", "upsert", "using",
"static", "super", "switch", "synchronized", "system", "testmethod", "then", "this", "virtual", "void", "webservice", "when", "where", "while"
"this_month", "this_week", "throw", "time", "today", "tolabel", "tomorrow", "transaction",
"trigger", "true", "try", "type", "undelete", "update", "upsert", "using",
"virtual", "webservice", "when", "where", "while", "yesterday"
)); ));
languageSpecificPrimitives = new HashSet<String>( languageSpecificPrimitives = new HashSet<String>(

View File

@ -13,7 +13,7 @@
/** /**
* Describes the result of uploading an image resource * Describes the result of uploading an image resource
*/ */
public class OASApiResponse implements OAS.MappedProperties { public class OASApiResponse {
/** /**
* Get code * Get code
* @return code * @return code
@ -21,10 +21,10 @@ public class OASApiResponse implements OAS.MappedProperties {
public Integer code { get; set; } public Integer code { get; set; }
/** /**
* Get r_type * Get type
* @return r_type * @return type
*/ */
public String r_type { get; set; } public String type { get; set; }
/** /**
* Get message * Get message
@ -32,18 +32,10 @@ public class OASApiResponse implements OAS.MappedProperties {
*/ */
public String message { get; set; } public String message { get; set; }
private static final Map<String, String> propertyMappings = new Map<String, String>{
'type' => 'r_type'
};
public Map<String, String> getPropertyMappings() {
return propertyMappings;
}
public static OASApiResponse getExample() { public static OASApiResponse getExample() {
OASApiResponse apiResponse = new OASApiResponse(); OASApiResponse apiResponse = new OASApiResponse();
apiResponse.code = 0; apiResponse.code = 0;
apiResponse.r_type = ''; apiResponse.type = '';
apiResponse.message = ''; apiResponse.message = '';
return apiResponse; return apiResponse;
} }
@ -52,7 +44,7 @@ public class OASApiResponse implements OAS.MappedProperties {
if (obj instanceof OASApiResponse) { if (obj instanceof OASApiResponse) {
OASApiResponse apiResponse = (OASApiResponse) obj; OASApiResponse apiResponse = (OASApiResponse) obj;
return this.code == apiResponse.code return this.code == apiResponse.code
&& this.r_type == apiResponse.r_type && this.type == apiResponse.type
&& this.message == apiResponse.message; && this.message == apiResponse.message;
} }
return false; return false;
@ -61,7 +53,7 @@ public class OASApiResponse implements OAS.MappedProperties {
public Integer hashCode() { public Integer hashCode() {
Integer hashCode = 43; Integer hashCode = 43;
hashCode = (17 * hashCode) + (code == null ? 0 : System.hashCode(code)); hashCode = (17 * hashCode) + (code == null ? 0 : System.hashCode(code));
hashCode = (17 * hashCode) + (r_type == null ? 0 : System.hashCode(r_type)); hashCode = (17 * hashCode) + (type == null ? 0 : System.hashCode(type));
hashCode = (17 * hashCode) + (message == null ? 0 : System.hashCode(message)); hashCode = (17 * hashCode) + (message == null ? 0 : System.hashCode(message));
return hashCode; return hashCode;
} }