<commit_before>---
rule:
  aip: 132
  name: [core, '0132', request-unknown-fields]
  summary: List RPCs should not have unexpected fields in the request.
permalink: /132/request-unknown-fields
redirect_from:
  - /0132/request-unknown-fields
---

# List methods: Unknown fields (Response)

This rule enforces that all `List` standard methods do not have unexpected
fields, as mandated in [AIP-132][].

## Details

This rule looks at any message matching `List*Response` and complains if it
comes across any fields other than:

- The resource.
- `int32/int64 total_size` ([AIP-132][])
- `string next_page_token` ([AIP-158][])
- `repeated string unavailable` ([AIP-217][])

It only checks field names; it does not validate type correctness or
repeated-ness.

## Examples

**Incorrect** code for this rule:
<commit_msg>[fix] Fix permalink for 132/response-unknown-fields (#412)<commit_after>---
rule:
  aip: 132
  name: [core, '0132', response-unknown-fields]
  summary: List RPCs should not have unexpected fields in the response.
permalink: /132/response-unknown-fields
redirect_from:
  - /0132/response-unknown-fields
---

# List methods: Unknown fields (Response)

This rule enforces that all `List` standard methods do not have unexpected
fields, as mandated in [AIP-132][].

## Details

This rule looks at any message matching `List*Response` and complains if it
comes across any fields other than:

- The resource.
- `int32/int64 total_size` ([AIP-132][])
- `string next_page_token` ([AIP-158][])
- `repeated string unavailable` ([AIP-217][])

It only checks field names; it does not validate type correctness or
repeated-ness.

## Examples

**Incorrect** code for this rule:

{'fraction_non_alphanumeric': 0.1179273377010125, 'fraction_numerical': 0.039309112567004166, 'mean_word_length': 4.401929260450161, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5617406', 'n_tokens_mistral': 578, 'n_tokens_neox': 511, 'n_words': 195}