Hi joejoyce - thanks for reaching out.
I have previously released APIs (by not using Domains) - this works fine as once the API is published - it cannot be modified.
After talking with some of your colleagues I was introduced to Domains - which sounds like a great idea (we reuse a lot of definitions between different APIs). We are about to release the next big API (actually we are going to release 4 new APIs based on Domains). There are a lot of worries that when publishing the API domains can still change - as in types, names, everything referenced from an API to a Domain can change!
I would suspect this is an error as the hole point of publishing an API is to make it readOnly.
If you want a concrete example I can give one here:
CustomerAPI v1.0.0 containing a GET /customers
in the CustomerAPI definition of the above response a reference to the Customer-component defined in GlobalDomain v1.0.0 is inserted:
/customers:
get:
responses:
'200':
description: Request successful
content:
application/json:
schema:
$ref: 'https://api.swaggerhub.com/domains/XXXorg/GlobalDomain/1.0.0#/components/schemas/customer'
Now in GlobalDomain v1.0.0 i start by defining Customer like this:
components:
schemas:
customer:
type: string
...
(To make it simple - customer is a type: string)
I then publish CustomerAPI v1.0.0 with the endpoint GET /customers the response here is a string (for now)
Someone then opens GlobalDomain v1.0.0 (since it is not published and therefore NOT readOnly) and changes customer to:
components:
schemas:
customer:
type: integer
...
(Changes type:string -> type:integer)
Now the published GET /customers endPoint of CustomerAPI returns an integer instead of a string!
I would be glad to take this up with the SwaggerHub product team - let me know how to contact them and I will do so 🙂