(format, name string)
| 321 | } |
| 322 | |
| 323 | func stringPlaceholder(format, name string) string { |
| 324 | switch format { |
| 325 | case "date-time": |
| 326 | return placeholderTime |
| 327 | case "date": |
| 328 | return placeholderDate |
| 329 | case "uri", "url": |
| 330 | return placeholderURL |
| 331 | case "email": |
| 332 | return "monalisa@example.com" |
| 333 | case "uuid": |
| 334 | return "00000000-0000-0000-0000-000000000000" |
| 335 | } |
| 336 | if name == "" { |
| 337 | return "string" |
| 338 | } |
| 339 | return name |
| 340 | } |
| 341 | |
| 342 | // discriminatorValue is the value that selects alt, such as "private" for |
| 343 | // GitHub's private-user schema. |