The interactive forms are disabled, as no `host` property was found in the specification
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The interactive forms are disabled, as no `host` property was found in the specification
When importing API I am getting error as "The interactive forms are disabled, as no `host` property was found in the specification. Please see: OAI 2.0/#swagger-object" And I dont know where to add host config in yaml file.
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
Thanks for reaching out.
Short answer? Its a root level property.
Longer answer...
The host property is meant to identify the host of the API, without the schema or any URIs.
Something like...
swagger: '2.0' # I'm a swagger document host: petstore.swagger.io # The host of the API schemes: - http # Only served over HTTP, not HTTPS basePath: /v2 # Optional basePath, that all paths fall under paths: # ... your paths / endpoints
Here is a functional example, to better illustrate ...
https://swaggerhub.com/api/ponelat/findByStatus/1
Happy coding!
Feel free to bug us, if something isn't working.
Josh
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ponelat I have another issue now ...I imported my api definition and also went on to add integration with amazon API gateway but when I go to aws console, I can't see my API there?
What am I missing?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also see If I have correctly implemented host property at https://swaggerhub.com/api/sandy007/ffnodeapi/1.0.0
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm afraid I don't know much about the Plugins... but someone who does will be on later. I'll leave that to them.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
alrighty..... Thanks a lot Josh.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regarding your spec...
Host is correct... but you do have two 'basePath' properties. YAML is like JSON, in that it doesn't know what to do with two 🙂
I'm guessing the `basePath: /api` is the correct one, not the `basePath: /v1` on line 37?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're welcome 🙂
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ponelat should I be giving my public ip as host value? when I do that I get error as
connect ECONNREFUSED 27.106.109.11:443
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yeah the public IP should work fine.
Can you 'curl' your server?
