AEP-0162 Linter Rules
Commit methods- HTTP body
Commit methods: HTTP body
This rule enforces that all Commit
RPCs use *
as the HTTP body
, as mandated in
AEP-162.
Details
This rule looks at any method beginning with Commit
, and complains
if the HTTP body
field is anything other than *
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Commit methods- POST HTTP verb
Commit methods: POST HTTP verb
This rule enforces that all Commit
RPCs use the POST
HTTP verb, as
mandated in AEP-162.
Details
This rule looks at any method beginning with Commit
, and complains
if the HTTP verb is anything other than POST
. It does check additional
bindings if they are present.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Commit methods- URI suffix
Commit methods: URI suffix
This rule enforces that Commit
methods include the :commit
suffix
in the REST URI, as mandated in AEP-162.
Details
This rule looks at any method beginning with Commit
, and
complains if the HTTP URI does not end with :commit
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Commit methods- Request message
Commit methods: Request message
This rule enforces that all Commit
RPCs have a request message name of
Commit*Request
, as mandated in AEP-162.
Details
This rule looks at any method beginning with Commit
, and complains
if the name of the corresponding input message does not match the name of the
RPC with the suffix Request
appended.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Commit requests- Name field behavior
Commit requests: Name field behavior
This rule enforces that all Commit
requests have
google.api.field_behavior
set to REQUIRED
on their string name
field, as
mandated in AEP-162.
Details
This rule looks at any message matching Commit*Request
and complains if the
name
field does not have a google.api.field_behavior
annotation with a
value of REQUIRED
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the field. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Commit requests- Name field
Commit requests: Name field
This rule enforces that all Commit
methods have a string name
field in the request message, as mandated in AEP-162.
Details
This rule looks at any message matching Commit*Request
and complains if
either the name
field is missing or it has any type other than string
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the message (if
the name
field is missing) or above the field (if it is the wrong type).
Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Commit requests- Name resource reference
Commit requests: Name resource reference
This rule enforces that all Commit
requests have
google.api.resource_reference
on their string name
field, as mandated in
AEP-162.
Details
This rule looks at the name
field of any message matching Commit*Request
and complains if it does not have a google.api.resource_reference
annotation.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the field. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Commit methods- Response message
Commit methods: Response message
This rule enforces that all Commit
RPCs have a response message of the
resource, as mandated in AEP-162.
Details
This rule looks at any method beginning with Commit
, and complains
if the name of the corresponding output message does not match the name of the
RPC with the prefix Commit
removed.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Delete Revision methods- HTTP body
Delete Revision methods: HTTP body
This rule enforces that all Delete Revision RPCs have no HTTP body
, as mandated in
AEP-162.
Details
This rule looks at any method matching Delete*Revision
, and complains
if it has an HTTP body
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Delete Revision methods- POST HTTP verb
Delete Revision methods: POST HTTP verb
This rule enforces that all Delete Revision RPCs use the DELETE
HTTP verb, as
mandated in AEP-162.
Details
This rule looks at any method matching Delete*Revision
, and complains
if the HTTP verb is anything other than DELETE
. It does check additional
bindings if they are present.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Delete Revision methods- URI suffix
Delete Revision methods: URI suffix
This rule enforces that Delete Revision methods include the :deleteRevision
suffix
in the REST URI, as mandated in AEP-162.
Details
This rule looks at any method matching Delete*Revision
, and
complains if the HTTP URI does not end with :deleteRevision
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Delete Revision methods- Request message
Delete Revision methods: Request message
This rule enforces that all Delete Revision RPCs have a request message name of
Delete*RevisionRequest
, as mandated in AEP-162.
Details
This rule looks at any method matching Delete*Revision
, and complains
if the name of the corresponding input message does not match the name of the
RPC with the suffix Request
appended.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Delete Revision requests- Name field behavior
Delete Revision requests: Name field behavior
This rule enforces that all Delete Revision requests have
google.api.field_behavior
set to REQUIRED
on their string name
field, as
mandated in AEP-162.
Details
This rule looks at any message matching Delete*RevisionRequest
and complains if the
name
field does not have a google.api.field_behavior
annotation with a
value of REQUIRED
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the field. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Delete Revision requests- Name field
Delete Revision requests: Name field
This rule enforces that all Delete Revision methods have a string name
field in the request message, as mandated in AEP-162.
Details
This rule looks at any message matching Delete*RevisionRequest
and complains if
either the name
field is missing or it has any type other than string
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the message (if
the name
field is missing) or above the field (if it is the wrong type).
Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Delete Revision requests- Name resource reference
Delete Revision requests: Name resource reference
This rule enforces that all Delete Revision requests have
google.api.resource_reference
on their string name
field, as mandated in
AEP-162.
Details
This rule looks at the name
field of any message matching Delete*RevisionRequest
and complains if it does not have a google.api.resource_reference
annotation.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the field. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Delete Revision methods- Response message
Delete Revision methods: Response message
This rule enforces that all Delete Revision RPCs have a response message of the resource, as mandated in AEP-162.
Details
This rule looks at any message matching Delete*Revision
, and complains
if the corresponding output message does not match the name of the RPC with the
prefix Delete
and suffix Revision
removed.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Rollback methods- HTTP body
Rollback methods: HTTP body
This rule enforces that all Rollback
RPCs use *
as the HTTP body
, as mandated in
AEP-162.
Details
This rule looks at any method beginning with Rollback
, and complains
if the HTTP body
field is anything other than *
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Rollback methods- POST HTTP verb
Rollback methods: POST HTTP verb
This rule enforces that all Rollback
RPCs use the POST
HTTP verb, as
mandated in AEP-162.
Details
This rule looks at any method beginning with Rollback
, and complains
if the HTTP verb is anything other than POST
. It does check additional
bindings if they are present.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Rollback methods- URI suffix
Rollback methods: URI suffix
This rule enforces that Rollback
methods include the :rollback
suffix
in the REST URI, as mandated in AEP-162.
Details
This rule looks at any method beginning with Rollback
, and
complains if the HTTP URI does not end with :rollback
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Rollback methods- Request message
Rollback methods: Request message
This rule enforces that all Rollback
RPCs have a request message name of
Rollback*Request
, as mandated in AEP-162.
Details
This rule looks at any method beginning with Rollback
, and complains
if the name of the corresponding input message does not match the name of the
RPC with the suffix Request
appended.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Rollback requests- Name field behavior
Rollback requests: Name field behavior
This rule enforces that all Rollback
requests have
google.api.field_behavior
set to REQUIRED
on their string name
field, as
mandated in AEP-162.
Details
This rule looks at any message matching Rollback*Request
and complains if the
name
field does not have a google.api.field_behavior
annotation with a
value of REQUIRED
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the field. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Rollback requests- Name field
Rollback requests: Name field
This rule enforces that all Rollback
methods have a string name
field in the request message, as mandated in AEP-162.
Details
This rule looks at any message matching Rollback*Request
and complains if
either the name
field is missing or it has any type other than string
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the message (if
the name
field is missing) or above the field (if it is the wrong type).
Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Rollback requests- Name resource reference
Rollback requests: Name resource reference
This rule enforces that all Rollback
requests have
google.api.resource_reference
on their string name
field, as mandated in
AEP-162.
Details
This rule looks at the name
field of any message matching Rollback*Request
and complains if it does not have a google.api.resource_reference
annotation.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the field. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Rollback requests- Revision ID field behavior
Rollback requests: Revision ID field behavior
This rule enforces that all Rollback
requests have
google.api.field_behavior
set to REQUIRED
on their string revision_id
field, as
mandated in AEP-162.
Details
This rule looks at any message matching Rollback*Request
and complains if the
revision_id
field does not have a google.api.field_behavior
annotation with a
value of REQUIRED
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the field. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Rollback requests- Revision ID field
Rollback requests: Revision ID field
This rule enforces that all Rollback
methods have a string revision_id
field in the request message, as mandated in AEP-162.
Details
This rule looks at any message matching Rollback*Request
and complains if
either the revision_id
field is missing or it has any type other than string
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the message (if
the name
field is missing) or above the field (if it is the wrong type).
Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Rollback methods- Response message
Rollback methods: Response message
This rule enforces that all Rollback
RPCs have a response message of the
resource, as mandated in AEP-162.
Details
This rule looks at any method beginning with Rollback
, and complains
if the name of the corresponding output message does not match the name of the
RPC with the prefix Rollback
removed.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Tag Revision methods- HTTP body
Tag Revision methods: HTTP body
This rule enforces that all Tag Revision RPCs use *
as the HTTP body
, as mandated in
AEP-162.
Details
This rule looks at any method matching Tag*Revision
, and complains
if the HTTP body
field is anything other than *
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Tag Revision methods- POST HTTP verb
Tag Revision methods: POST HTTP verb
This rule enforces that all Tag Revision RPCs use the POST
HTTP verb, as
mandated in AEP-162.
Details
This rule looks at any method matching Tag*Revision
, and complains
if the HTTP verb is anything other than POST
. It does check additional
bindings if they are present.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Tag Revision methods- URI suffix
Tag Revision methods: URI suffix
This rule enforces that Tag Revision methods include the :tagRevision
suffix
in the REST URI, as mandated in AEP-162.
Details
This rule looks at any method matching Tag*Revision
, and
complains if the HTTP URI does not end with :tagRevision
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Tag Revision methods- Request message
Tag Revision methods: Request message
This rule enforces that all Tag Revision RPCs have a request message name of
Tag*RevisionRequest
, as mandated in AEP-162.
Details
This rule looks at any method matching Tag*Revision
, and complains
if the name of the corresponding input message does not match the name of the
RPC with the suffix Request
appended.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Tag Revision requests- Name field behavior
Tag Revision requests: Name field behavior
This rule enforces that all Tag Revision requests have
google.api.field_behavior
set to REQUIRED
on their string name
field, as
mandated in AEP-162.
Details
This rule looks at any message matching Tag*RevisionRequest
and complains if the
name
field does not have a google.api.field_behavior
annotation with a
value of REQUIRED
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the field. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Tag Revision requests- Name field
Tag Revision requests: Name field
This rule enforces that all Tag Revision methods have a string name
field in the request message, as mandated in AEP-162.
Details
This rule looks at any message matching Tag*RevisionRequest
and complains if
either the name
field is missing or it has any type other than string
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the message (if
the name
field is missing) or above the field (if it is the wrong type).
Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Tag Revision requests- Name resource reference
Tag Revision requests: Name resource reference
This rule enforces that all Tag Revision requests have
google.api.resource_reference
on their string name
field, as mandated in
AEP-162.
Details
This rule looks at the name
field of any message matching Tag*RevisionRequest
and complains if it does not have a google.api.resource_reference
annotation.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the field. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Tag Revision requests- Tag field behavior
Tag Revision requests: Tag field behavior
This rule enforces that all Tag Revision requests have
google.api.field_behavior
set to REQUIRED
on their string tag
field, as
mandated in AEP-162.
Details
This rule looks at any message matching Tag*RevisionRequest
and complains if the
tag
field does not have a google.api.field_behavior
annotation with a
value of REQUIRED
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the field. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Tag Revision requests- Tag field
Tag Revision requests: Tag field
This rule enforces that all Tag Revision methods have a string tag
field in the request message, as mandated in AEP-162.
Details
This rule looks at any message matching Tag*RevisionRequest
and complains if
either the tag
field is missing or it has any type other than string
.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the message (if
the tag
field is missing) or above the field (if it is the wrong type).
Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.
Tag Revision methods- Response message
Tag Revision methods: Response message
This rule enforces that all Tag Revision RPCs have a response message of the resource, as mandated in AEP-162.
Details
This rule looks at any method matching Tag*Revision
, and complains
if the name of the corresponding output message does not match the name of the
RPC with the prefix Tag
and suffix Revision
removed.
Examples
Incorrect code for this rule:
Correct code for this rule:
Disabling
If you need to violate this rule, use a leading comment above the method. Remember to also include an aep.dev/not-precedent comment explaining why.
If you need to violate this rule for an entire file, place the comment at the top of the file.