Also I want to follow REST API Convention for maintenance in future.
REST doesn't care what spelling conventions you use for your resource identifiers. Any spelling that is consistent with RFC 3986 is fine. For instance, if you look at RFC 7230, you'll see that there are no references to nouns.
http://example.org/C6CF1E69-1EFD-4836-BDF7-025972D85298
... is a perfectly acceptable URI.
After some searched, found that noun is used with plural.
Often, yes. In many cases, it makes to think of the elements of a collection as subordinates of the collection itself, and therefore the spelling /collection-name/member-id
comes up often.
But, as you note, not all English nouns have a plural form. It's also true that not all English nouns have a singular form. Any absolute rule is going to require either (a) a domain in which none of the exceptional nouns arise, or (b) some hedging.
The machines don't care -- we don't have compilers that are looking up plurals in dictionaries to ensure that the rules are being followed. As far as URI parsers are concerned, it's just a sequence of bytes that make up a path segment.
Only the human audience cares at all; and really the human beings don't care much that the correct spelling follows the rule, so much as they do that the correct spelling is easy to guess/remember.
In short, if you need identifiers for collections of butter
, or spectacles
, a reasonable protocol to follow is to take your best guess from the one spelling that is available to you, without worrying too much about whether that one spelling follows "the rule".
As far as I can tell, flask
doesn't have a strong opinion on URI plurals; if it doesn't, or if the opinions are not satisfactory, you could look to other libraries to see what they do (ex, spin up the Rails Inflector and see what the pluralize method does).