Api hostnames wIth WWW
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2022
03:15 AM
02-27-2022
03:15 AM
Api hostnames wIth WWW
I'm trying to understand if www.something.com is a valid api hostname or it doesn't ,can you please help me with explanation.
in continuous to this article: https://swagger.io/docs/specification/2-0/api-host-and-base-path/#:~:text=host%20is%20the%20domain%2....
Labels:
- Labels:
-
Swagger Editor
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2022
11:48 AM
03-04-2022
11:48 AM
Yes, "www.example.com" is a valid hostname, just like "api.example.com" and "subdomain.example.com". The "www" prefix is just a subdomain.
An OpenAPI 2.0 definition with this hostname could look like this:
swagger: '2.0'
host: www.example.com
schemes: [https]
basePath: /api
...
OpenAPI 3.0 version:
openapi: 3.0.0
servers:
- url: https://www.example.com/api
...
Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
