{
"InternalFoo": {
"allOf": [
{
"$ref": "foo.json#/PublicFoo"
}, { "properties": {
…}
]
}
}
What I'm trying to see is whether we could apply the same approach for extending the public API with partner and internal endpoints — ideally, we'd keep maintaining the external Swagger spec as is and the internal one would "inherit" from it and automatically benefit from additions to it, all the while accommodating the redefinition of certain response types and the addition of certain endpoints. At a fundamental level, what I'm trying to accomplish is:
swagger-internal.json
{"$ref": "swagger.json","paths": {"/foo/{id}": { "get": { "responses": { "200": { "schema": { "$ref": "internal-foo.json#/InternalFoo" }}}}}}},
Is such a thing supported at all by the tooling? Is there a different model we could follow to accomplish this?
Thanks,-JulienHi Julien,
The spec doesn’t quite support that. What it does support is referencing specific paths, and then theoretically you can add additional operations on top of that to the path.
In practice, I’m not sure too many tools would support adding the additional operations, though the paths referencing should work.
Depending on how you develop and build your API, you might be able to take a different approach. You can have everything in one file, and add some vendor extensions. You can write a very minimal app that will serve the spec with some form of authorization, and filter out the internal operations based on the extensions.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/xkn9tcx8tcM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
For any feature requests for the spec, you’re welcome to file a ticket at https://github.com/OAI/OpenAPI-Specification/.
--
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/xkn9tcx8tcM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.