-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: allow specifying Operation IDs #14
Comments
I like the idea. How about moving it even before token, so it represents the logic of // Update resources
updateResource = @token PATCH /parent/:a/resources/:b:integer (variant)?c&d?&e:boolean {f, g?, h: i[]}
=> 200 {resource: Resource} # Another comment
=> 404 NotFoundError |
Another option would be to move it backward representing // Update resources
@token PATCH /parent/:a/resources/:b:integer (variant)?c&d?&e:boolean {f, g?, h: i[]} "updateResource"
=> 200 {resource: Resource} # Another comment
=> 404 NotFoundError
@token GET /users "getUsers"
=> {users: User[]} Just an idea, I'm OK with both variants. |
The name before the tags has its merits, I'm ok with this. (I was placing it after the tags by following the stylistics of Java annotations.)
I don't like this. The definition can be quite long, and the name at the end will be hard to notice and track. |
Hey @pvgoran, are you still planning to implement this? |
@Ajaxy Yes, just a bit later. Right now, I'm preoccupied with the holiday activities. |
Operation definitions can now start with `<OperationId> = ` to provide Operation IDs instead of automatically generated ones. Closes Ajaxy#14.
Operation definitions can now start with `<OperationId> = ` to provide Operation IDs instead of automatically generated ones. Closes Ajaxy#14.
The auto-generated Operation IDs are often long, ugly and unconvenient to work with. It would be good to be able to specify Operation IDs manually in the tinyspec files.
For example, it could be done like this (using
tests/endpoints/sources/complex.endpoints.tinyspec
as a base):This would make
updateResource
the Operation ID. The syntax feels natural and non-intrusive, but of course it could be different.I suppose I can implement this in the code, as long as I know what syntax to use.
The text was updated successfully, but these errors were encountered: