-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BelgianPostCode #8
base: master
Are you sure you want to change the base?
Conversation
Two remarks:
|
I wonder if it shouldn't be BelgianPostalCode? "post code" (or I find more references to "postcode" as a single word), seems to be British English. |
Please do not use "int" for properties that are not meant to be used in calculations... It happens to be that postal codes are (now) all numeric, but no guarantees for the future And IMHO it's not a good idea to start doing things like "BelgianPostCode", "Belgian.... this, that". A postal code is a string that happens to be valid in a specific country (or more precise, assigned by a postal authority) |
@jpraet : postCode was standardized in fedvoc. It was discussed but can't recall exact reason; probably alignment with EU standards.
|
Description is probably be a bit long for display in SwaggerUI (or similar). We can discuss a shorter variant in the functional WG. |
reviewed and approved by REST WG; still needs review by functional WG |
@@ -20,10 +20,21 @@ components: | |||
type: integer | |||
minimum: 10000 | |||
maximum: 99999 | |||
BelgianPostCode: | |||
description: > | |||
Post code (a.k.a postal code, zip code etc.) of a location in Belgium. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My proposition is to just keep the first part:
Post code (a.k.a postal code, zip code etc.) of a location in Belgium.
The rest isn't commonly necessary to understand the field, having it only in fedvoc excel should suffice.
We could add the reference to list of post codes to fedvoc excel in comments column:
A list of Belgian post codes is published by bpost, and is also available as open dataset.
This is modified a bit bc of liberalization of Belgian post market.
will need to review this in functional WG
Functional WG accepted my above proposed changes to the description. It may be worthwhile to reconsider string for this entry instead of integer to make values be compatible with properties for international post codes, which need to be string. Then we'd have: BelgianPostCode:
description: Post code (a.k.a postal code, zip code etc.) of a location in Belgium
type: string
pattern: '^\d{4}$' # or pattern: '^[1-9]\d{3}$' |
for reference, the BeSt search API (https://dtservices.bosa.be/sites/default/files/content/download/files/best_search_openapi.zip) has: postCode:
name: postCode
in: query
description: Postal code
schema:
type: string
pattern: '^\d{4}$'
example: 1000
# ....
postCode:
description: Postal code (assigned by bPost)
type: string
example: 1500 So the input format it stricter than the output one. |
Description change applied.
I agree. I updated the type according the given proposition. The pattern disallowing leading zeroes ('^[1-9]\d{3}$') seems overly restrictive and not worth the pain. \d{4} is easier to read and it allows 0612 and also 0000 (a value which sometimes occurs in some National Register data). Thorough validation (whether the post code really exists) is up to the business application. |
No description provided.