{"id":15985389,"url":"https://github.com/ernado/optexample","last_synced_at":"2025-05-16T02:11:57.956Z","repository":{"id":233695784,"uuid":"769565693","full_name":"ernado/optexample","owner":"ernado","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-09T12:50:15.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-14T13:05:38.682Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ernado.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-09T12:46:34.000Z","updated_at":"2024-03-09T12:50:19.000Z","dependencies_parsed_at":"2024-04-17T06:07:47.277Z","dependency_job_id":"e353bca3-f4a2-4fb7-8cb8-0ef00d366f68","html_url":"https://github.com/ernado/optexample","commit_stats":null,"previous_names":["ernado/optexample"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernado%2Foptexample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernado%2Foptexample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernado%2Foptexample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernado%2Foptexample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ernado","download_url":"https://codeload.github.com/ernado/optexample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453625,"owners_count":22073618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T02:21:19.504Z","updated_at":"2025-05-16T02:11:57.939Z","avatar_url":"https://github.com/ernado.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# optexample\n\nWe have following shema:\n```yaml\nExample:\n  type: object\n  required:\n    - Required\n    - NullableRequired\n  properties:\n    Optional:\n      type: string\n    NullableOptional:\n      type: string\n      nullable: true\n    Required:\n      type: string\n      example: \"example\"\n    NullableRequired:\n      type: string\n      nullable: true\n```\n\n## ogen\n\n```go\ntype Example struct {\n\tOptional         OptString    `json:\"Optional\"`\n\tNullableOptional OptNilString `json:\"NullableOptional\"`\n\tRequired         string       `json:\"Required\"`\n\tNullableRequired NilString    `json:\"NullableRequired\"`\n}\n\ntype OptString struct {\n\tValue string\n\tSet   bool\n}\n\ntype OptNilString struct {\n\tValue string\n\tSet   bool\n\tNull  bool\n}\n\ntype NilString struct {\n\tValue string\n\tNull  bool\n}\n```\n\n## oapi-codegen\n\n```go\ntype Example struct {\n\tNullableOptional nullable.Nullable[string] `json:\"NullableOptional,omitempty\"`\n\tNullableRequired nullable.Nullable[string] `json:\"NullableRequired\"`\n\tOptional         *string                   `json:\"Optional,omitempty\"`\n\tRequired         string                    `json:\"Required\"`\n}\n\n// from nullable package\ntype Nullable[T any] map[bool]T\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fernado%2Foptexample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fernado%2Foptexample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fernado%2Foptexample/lists"}