{"id":15870983,"url":"https://github.com/int128/swagger-vendor-extensions","last_synced_at":"2025-07-23T03:08:08.644Z","repository":{"id":138193939,"uuid":"100188408","full_name":"int128/swagger-vendor-extensions","owner":"int128","description":"Example using Vendor Extensions in Swagger Template","archived":false,"fork":false,"pushed_at":"2020-07-04T12:06:56.000Z","size":69,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T22:31:59.450Z","etag":null,"topics":["code-generation","openapi","swagger"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/int128.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2017-08-13T16:05:37.000Z","updated_at":"2017-08-18T13:13:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"294f27fe-4a03-4b84-aefe-12f7c978a22d","html_url":"https://github.com/int128/swagger-vendor-extensions","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"12c5ca02c50d1b563480e644ba5047f7f0d5a9ee"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/int128/swagger-vendor-extensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fswagger-vendor-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fswagger-vendor-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fswagger-vendor-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fswagger-vendor-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/int128","download_url":"https://codeload.github.com/int128/swagger-vendor-extensions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/int128%2Fswagger-vendor-extensions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266609309,"owners_count":23955621,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["code-generation","openapi","swagger"],"created_at":"2024-10-06T00:41:16.143Z","updated_at":"2025-07-23T03:08:08.619Z","avatar_url":"https://github.com/int128.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swagger vendor extensions in Mustache template\n\nThis repository explains how to access vendor extensions in a Mustache template on Swagger Codegen.\n\n\n## How to implement Mustache\n\nAdd vendor extensions in the OpenAPI YAML.\n\n```yaml\ndefinitions:\n  Pet:\n    properties:\n      code:\n        type: string\n        # vendor extension begins with x-\n        x-validations:\n          isbn13: true\n```\n\nVendor extensions can be accessed in a template by the `vendorExtensions` property.\n\n```mustache\n  {{#vendorExtensions.x-validations.isbn13}}\n    // Access vendor extensions in Mustache template\n    @ISBN13\n  {{/vendorExtensions.x-validations.isbn13}}\n```\n\n\n## Example\n\nThis repository contains an example of using vendor extensions.\n\nGenerate code.\n\n```bash\n./gradlew generateSwaggerCode\n```\n\nThen open `build/swagger-code/src/main/java/example/model/Pet.java`.\n\n```java\npublic class Pet   {\n    \n  private Long id = null;\n\n    \n  private String name = null;\n\n    @ISBN13\n  private String code = null;\n\n// snip...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Fswagger-vendor-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fint128%2Fswagger-vendor-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fint128%2Fswagger-vendor-extensions/lists"}