FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: AIP-143 – Standardized codes by lukesneeringer · Pull Request #24 · aip-dev/aip.dev · GitHub

feat: AIP-143 – Standardized codes - #24

Open
lukesneeringer wants to merge 3 commits into
mainfrom
aip-143
Open

feat: AIP-143 – Standardized codes#24
lukesneeringer wants to merge 3 commits into
mainfrom
aip-143

Conversation

Copy link
Copy Markdown
Contributor

No description provided.

lukesneeringer requested a review from a team as a code owner February 2, 2021 18:39
Base automatically changed from master to main February 10, 2021 22:08
Comment thread aip/general/0143/aip.md
## Guidance

For concepts where a standardized code exists and is in common use, fields
representing these concepts **should** use the standardized code for both input

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
  • @Alfus The important part here is that the string itself is the immutable, canonical code, and is used on the wire format. You do not need to create a separate enum, and if you do, then you fall out of synchronization quickly.
    • @hudlow What this does bring to mind is that we validate that enums are lower snake strings. But this guidance correctly says, do not bastardize canonical codes into lower snake.
    • @lukesneeringer It sounds like the IBM linter needs an exception here, allowing industry standard formats.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@hudlow Perhaps a specific note about not bastardizing strings into a company's string enum format.

Comment thread aip/general/0143/aip.md Outdated

- Fields representing standardized concepts **must** use the appropriate data
type for the standard code (usually `string`).
- Fields representing standardized concepts **should not** use enums, even if

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Maybe distinguish the OpenAPI "choices" concept here.

Comment thread aip/general/0143/aip.md
case-insensitive unless this would introduce ambiguity (for example, accept
both `en-gb` and `en-GB`). When providing values to users, APIs **should**
use the canonical case (in the example above, `en-GB`).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Maybe add a quick section about defaults, saying that defaults are permissible, and the sentinel value must be empty.

google-cla Bot added the cla: yes label May 18, 2021

mkistler left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good! 👍

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL