{"id":22568249,"url":"https://github.com/vandlj/osslicensesapi","last_synced_at":"2026-05-03T04:37:42.800Z","repository":{"id":225305395,"uuid":"765619409","full_name":"VandlJ/OSSLicensesAPI","owner":"VandlJ","description":"OSSLicensesAPI is a comprehensive API designed to provide information and insights on various open-source software licenses. Built using C# and Python, this API facilitates easy access to license data for developers and organizations.","archived":false,"fork":false,"pushed_at":"2024-03-21T21:37:26.000Z","size":56144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T14:13:49.925Z","etag":null,"topics":["api","api-rest","csharp","licences","open-source","oss","python","software-licensing"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"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/VandlJ.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":"2024-03-01T09:31:27.000Z","updated_at":"2024-12-10T16:12:18.000Z","dependencies_parsed_at":"2024-03-21T10:46:12.956Z","dependency_job_id":"f4002388-f5fa-481c-b8d9-b9634bc441bc","html_url":"https://github.com/VandlJ/OSSLicensesAPI","commit_stats":null,"previous_names":["vandlj/osslicensesapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VandlJ%2FOSSLicensesAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VandlJ%2FOSSLicensesAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VandlJ%2FOSSLicensesAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VandlJ%2FOSSLicensesAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VandlJ","download_url":"https://codeload.github.com/VandlJ/OSSLicensesAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246041400,"owners_count":20714138,"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":["api","api-rest","csharp","licences","open-source","oss","python","software-licensing"],"created_at":"2024-12-08T00:12:20.063Z","updated_at":"2026-05-03T04:37:42.745Z","avatar_url":"https://github.com/VandlJ.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\nThis C# project is a RESTful API designed to manage and query compatibility data between software licenses. It utilizes ASP.NET Core framework for building web applications and Entity Framework Core for database operations.\n\n## Overview\n\nThe API includes functionality for checking compatibility between two licenses, retrieving unique license names, and managing license compatibility records. The compatibility data is stored in a MySQL database.\n\n## Database Setup\n\nThe MySQL database is used to store license compatibility data. The database schema includes a table named `license_compatibility` with columns for the first license (`License1`), the second license (`License2`), and the compatibility status (`Compatibility`). The database is populated using a Python script (`populate_database.py`) that reads data from a CSV file (`matrix.csv`) and inserts it into the `license_compatibility` table.\n\n## API Endpoints\n\n### Check Compatibility\n\n- **GET** `/api/CompatibilityMatrix/CheckCompatibility`:\n  - This endpoint accepts query parameters representing two license names (`license1` and `license2`) and returns the compatibility result as a `CompatibilityResponseModel` JSON object.\n\n### Get Unique License Names\n\n- **GET** `/api/CompatibilityMatrix/GetLicenses`:\n  - This endpoint retrieves a list of unique license names stored in the database and returns them as a JSON array of strings.\n\n### Swagger UI\n\nThe API is documented using Swagger/OpenAPI specification and can be explored interactively in a web browser by accessing the following URL: [http://localhost:5191/swagger](http://localhost:5191/swagger).\n\n## Project Structure\n\n- `Program.cs`: Configures the application and sets up the HTTP request pipeline.\n- `InLicenses.cs`: Defines the input model for licenses.\n- `LicenseCompatibility.cs`: Defines the model for license compatibility records.\n- `ApplicationDbContext.cs`: Represents the database context for Entity Framework Core.\n- `CompatibilityMatrixController.cs`: Implements the API endpoints for license compatibility management.\n- `populate_database.py`: Python script to populate the MySQL database with license compatibility data from a CSV file.\n\n## Usage\n\nTo use the API:\n1. Set up a MySQL database and configure the connection string in `appsettings.json`.\n2. Run the Python script `populate_database.py` to populate the database with license compatibility data.\n3. Run the C# project to start the API.\n4. Explore the API endpoints and interact with them using Swagger UI.\n\n## Notes\n\n- This project demonstrates how to build a RESTful API using ASP.NET Core, Entity Framework Core, and MySQL database.\n- The Python script `populate_database.py` is provided as an example of how to automate the process of populating the database with data from a CSV file.\n- For more information on configuring and using Swagger/OpenAPI with ASP.NET Core, refer to [Swashbuckle documentation](https://github.com/domaindrivendev/Swashbuckle.AspNetCore).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvandlj%2Fosslicensesapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvandlj%2Fosslicensesapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvandlj%2Fosslicensesapi/lists"}