{"id":26129476,"url":"https://github.com/mathworks-ref-arch/matlab-openapi-generator","last_synced_at":"2025-04-13T18:42:26.187Z","repository":{"id":193097345,"uuid":"685947101","full_name":"mathworks-ref-arch/matlab-openapi-generator","owner":"mathworks-ref-arch","description":"MATLAB Generator for OpenAPI enables generation of RESTful Clients and Models based on OpenAPI 3.0 specifications","archived":false,"fork":false,"pushed_at":"2025-03-11T15:20:17.000Z","size":209,"stargazers_count":4,"open_issues_count":4,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-27T09:23:37.934Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathworks-ref-arch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-01T11:31:30.000Z","updated_at":"2025-03-11T15:19:33.000Z","dependencies_parsed_at":"2025-02-27T11:50:47.455Z","dependency_job_id":"ac914294-ef16-464a-bc49-5d4914cd35b5","html_url":"https://github.com/mathworks-ref-arch/matlab-openapi-generator","commit_stats":null,"previous_names":["mathworks-ref-arch/matlab-openapi-generator"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks-ref-arch%2Fmatlab-openapi-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks-ref-arch%2Fmatlab-openapi-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks-ref-arch%2Fmatlab-openapi-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks-ref-arch%2Fmatlab-openapi-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathworks-ref-arch","download_url":"https://codeload.github.com/mathworks-ref-arch/matlab-openapi-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248764791,"owners_count":21158155,"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":"2025-03-10T19:49:02.376Z","updated_at":"2025-04-13T18:42:26.167Z","avatar_url":"https://github.com/mathworks-ref-arch.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MATLAB Generator *for OpenAPI*\n\nMATLAB® Generator *for OpenAPI™* provides a generator to enable generation of RESTful Clients and Models based on OpenAPI 3.0 specifications. OpenAPI was formerly known as Swagger. The core of this package is a Java class that extends the community Generator CLI and Mustache template files for APIs and Models.\n\n## Requirements\n\n### MathWorks Products [https://www.mathworks.com](https://www.mathworks.com)\n\n* Requires MATLAB release R2020b or later.\n\n### 3rd Party Products\n\n* Java Development Kit (JDK) 11 or compatible.\n* [Maven](https://maven.apache.org/) 3.6 or greater.\n* [OpenAPITools openapi-generator](https://github.com/openapitools/openapi-generator), downloaded by `setup.m`.\n* Node.js is required only if using the unit test suite or using `npx` at the command line.\n\n## Introduction\n\nThis package is developed and tested using [OpenAPI](https://github.com/OAI/OpenAPI-Specification)\nversion 3, in many cases it may work with a version 2 specifications however this is not supported. Please consider migrating the specification to version 3.\n\n## Getting Started\n\nPlease refer to the [Documentation](Documentation/README.md) to get started. The [Getting Started](Documentation/GettingStarted.md) and [Basic Usage](Documentation/BasicUsage.md) documents provide more detailed instructions on setting up and using the interface.\n\n## Installation\n\nThe MathWorks provided Java code in this package uses the OpenAPITools openapi-generator package. A `pom.xml` files is provided. The resulting jar can be built using:\n\n```bash\ncd package-directory/Software/Java\nmvn clean package\n```\n\n## Usage\n\nTo generate MATLAB client code for the well known [PetStore](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml) sample spec, download it and use commands similar to:\n\n### Using a MATLAB client builder\n\n```matlab\n% Run startup to configure the package's MATLAB paths\ncd \u003cpackage_directory\u003e/Software/MATLAB\nstartup\ncd ..\n\n% Create a builder object\nc = openapi.build.Client;\n% Set the package name, defaults to \"OpenAPIClient\"\nc.packageName = \"PetStore\";\n% Set the path to the spec., this may also be a HTTP URL\nc.inputSpec = \"openapi.yaml\";\n% Set a directory where the results will be stored\nc.output = fullfile(pwd, \"PetClient\");\n% Trigger the build process\nc.build;\n```\n\n### Using the command line\n\nIf there is a preference to work directly with the Node.js `npx` command rather than the higher-level MATLAB client, it can be called as follows. On Linux:\n\n```bash\ncd \u003cpackage_directory\u003e/Software\nnpx @openapitools/openapi-generator-cli --custom-generator MATLAB/lib/jar/MATLABClientCodegen-openapi-generator-0.0.1.jar generate -g MATLAB -i openapi.yaml -o PetClient --package-name PetStore\n```\n\nIf not working in the package's `Software` directory, use full paths and add the following additional arguments:\n\n```bash\n-t \"\u003cpackage_directory\u003e/Software/Mustache\" --additional-properties openapiRoot=\"\u003cpackage_directory\u003e/Software/MATLAB\n```\n\nOr on Windows replace the forward slashes in local paths with back slashes:\n\n```bat\ncd \u003cpackage_directory\u003e\\Software\nnpx @openapitools/openapi-generator-cli --custom-generator MATLAB\\lib\\jar\\MATLABClientCodegen-openapi-generator-0.0.1.jar generate -g MATLAB -i openapi.yaml -o PetClient --package-name PetStore\n```\n\nIf not working in the package's `Software` directory, use full paths and add the following additional arguments:\n\n```bat\n-t \"c:\\\u003cpackage_directory\u003e\\Software\\Mustache\" --additional-properties openapiRoot=\"c:\\ \u003cpackage_directory\u003e\\Software\\MATLAB\"\n```\n\n\u003e The slash in `@openapitools/openapi-generator-cli` is Node/npx syntax and not a local path, so this needs to remain a forward slash.\n\n## License\n\nThe license for the MATLAB Generator *for OpenAPI* is available in the [LICENSE.txt](LICENSE.txt) file in this repository. This package uses certain third-party content which is licensed under separate license agreements. Please see the pom.xml file for third-party software downloaded at build time.\n\n## Enhancement Requests\n\nProvide suggestions for additional features or capabilities using the following link:\n\u003chttps://www.mathworks.com/products/reference-architectures/request-new-reference-architectures.html\u003e\n\n## Support\n\nEmail: `mwlab@mathworks.com` or please log an issue.\n\n[//]: #  (Copyright 2019-2025 The MathWorks, Inc.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-ref-arch%2Fmatlab-openapi-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathworks-ref-arch%2Fmatlab-openapi-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks-ref-arch%2Fmatlab-openapi-generator/lists"}