Hi all, Up to now, we have been using Swagger 2 as the REST API documentation mechanism in Identity Server. With the recent admin API development work, we got requirements to use the new features available with OpenAPI 3. These new features mostly included the usage of combined schemas using oneOf and allOf keywords [1].
With that in mind, we started using the OpenAPI Generator [2]. After writing a custom generator and some templates [6], we could generate server stubs according to our requirements. However, we noticed that the OpenAPI Generator does not support generating server stubs for oneOf keyword [3]. Then we evaluated the Swagger Codegen tool [4] also and we noticed that it has some support for oneOf keyword, but the generated stub method is not the best approach IMO. However, we have decided to continue using OpenAPI 3 (with OpenAPI Generator) because of the following advantages. - support for allOf keyword - support for Read-Only and Write-Only Properties [5] We will continue to evaluate the Swagger Codegen tool and if it fits our use cases than OpenAPI Generator, we will switch to Swagger Codegen tool. [1] https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/ [2] https://github.com/OpenAPITools/openapi-generator [3] https://github.com/OpenAPITools/openapi-generator/issues/15 [4] https://github.com/swagger-api/swagger-codegen/tree/3.0.0 [5] https://swagger.io/docs/specification/data-models/data-types/ [6] https://github.com/madurangasiriwardena/openapi-generator-cxf-wso2 Regards,
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev