@comradepeter87

IMO there should be a small caveat - your API should still be strictly typed/highly structural, it's just that the possible space of objects of that type can be larger than what is actually allowed.

@DebdutBiswasOnline

We do follow this conservative way,

Strict schemas
Regex validation
Input sanitization

@rahuljindal244

We have strictly typed schema for our apis. We have defined schema using protos. We are running grpc service.

@awesomeworld557

Although correct remember exceptions do exist

@ranjeetd90

Then the business people come back shouting why they don't see all the data they entered and why some part of it is missing??? It might be rude in social life to correct people upfront but in API world it is must to enjoy your personal life instead of explaining how liberal your were while trimming their data and changing it to lower/upper case.

@JigarDhulla

Sorry. I don't think we should trim user's long bio. Instead we should give validation error saying it should be less than n.

@funwithone_official

If someone put their username in camlecase if back and stored in small then while retrieving again how this will be converted into camlecase again

@enochnyako

I wasn’t sure about the username example but it does work and make sense if all auth and similar operations know to apply the same transformation to the user input. 
Thanks Arpit

@rangerboi9715

We use Zod for that in typescript at both our frontend and backend. works like a charm

@rigveddesai5843

are you sure about the bio example? if there's a character limit, shouldn't we be failing the operation and sending an error back to the user instead of trimming and saving it which isn't exactly the expected behaviour in most cases.

with that being said, nice video 👍

@deveshmishra9521

In my view...rulenl is very simple...u should know what user of api will require and what you are needed...simple...baki..use any word to standardize your method as law....for interview.😊

@draco4717

Thanks for reminding me on this

@anantakesharipanda4085

Wouldn’t Input sanitisation while accepting inputs work against “being liberal” while accepting inputs? 
Like checking for injection or overflow scripts in bio or username string? Although it’s less of an issue to worry about if your dev frameworks takes care of cleaning up of input strings, but still, someone has to be conservative towards what data they’re letting in, isn’t it?

@AmritaChakraborty-p2c

Hi! How can we connect for a project?

@Ganapamanoj

Trimming the bio (or) lower casing the username without user acknowledgement seems incorrect.

@radhikagadve

Amazing

@adityakiran2956

Wh should yhe case be changed before storing it in the db? Is it done to ensure a consistent standard between all the data being stored in the db? Or is there ac actual benefit to this?

@awesome-kartikey

Typescript

@prathmeshjagtap2898

Thanks for sharing this and actui am following it, but after watching it i felt confident in my learnings #selflearner

@ArjunSingh-sr6jf

Want more depth knowledge about good APIs