You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using the fake smtp server to perform integration test, i.e. check if certain events in our application actually send emails. To automate this, we use the API of the server to fetch and check the emails. We use a Java generator which creates DTO's from the schema components in the openapi. The generator reflects also the specification of optional/required and nullability. Thus it generates getters with Optional as return value in case the properties are optional which seems to be the case for every property in the specification. Is this intentionally?
I could either check every property before accessing it, if its already there (which could be avoided in case the specification tells which property must exist) or I could just avoid all checks but then I dont know which property is really optional and may be absent. What was the intention here or how should one access the API?
The text was updated successfully, but these errors were encountered:
We are using the fake smtp server to perform integration test, i.e. check if certain events in our application actually send emails. To automate this, we use the API of the server to fetch and check the emails. We use a Java generator which creates DTO's from the schema components in the openapi. The generator reflects also the specification of optional/required and nullability. Thus it generates getters with Optional as return value in case the properties are optional which seems to be the case for every property in the specification. Is this intentionally?
I could either check every property before accessing it, if its already there (which could be avoided in case the specification tells which property must exist) or I could just avoid all checks but then I dont know which property is really optional and may be absent. What was the intention here or how should one access the API?
The text was updated successfully, but these errors were encountered: