Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Introduce an annotation attachment point for service object type descriptor #1305

Open
TharmiganK opened this issue May 30, 2024 · 0 comments
Labels
Area/Lang Relates to the Ballerina language specification Type/Improvement Enhancement to language design

Comments

@TharmiganK
Copy link

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.

@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;
};

Related Issues:
[Proposal] Map OpenAPI Specification (OAS) to service object type

@TharmiganK TharmiganK changed the title Introduce a annotation attachment point for service object type descriptor Introduce an annotation attachment point for service object type descriptor May 30, 2024
@anupama-pathirage anupama-pathirage added Type/Improvement Enhancement to language design Area/Lang Relates to the Ballerina language specification labels Nov 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area/Lang Relates to the Ballerina language specification Type/Improvement Enhancement to language design
Projects
None yet
Development

No branches or pull requests

2 participants