We have a requirement to add an annotation on the service object type descriptor nodes. But currently there is no such attachment point in the spec, so I need to enable the annotation on all type descriptor nodes and do a validation through a custom compiler plugin.
@openapi:ServiceConfig {
basePath: "social-media"
}
type SocialMedia service object {
*http:Service;
resource function get users() returns User[]|error;
resource function get users/[int id]() returns User|UserNotFound|error;
resource function post users(NewUser newUser) returns http:Created|error;
resource function delete users/[int id]() returns http:NoContent|error;
};
Description:
We have a requirement to add an annotation on the service object type descriptor nodes. But currently there is no such attachment point in the spec, so I need to enable the annotation on all type descriptor nodes and do a validation through a custom compiler plugin.
Related Issues: [Proposal] Map OpenAPI Specification (OAS) to service object type