diff --git a/openapi/index.html b/openapi/index.html new file mode 100644 index 0000000..a3204aa --- /dev/null +++ b/openapi/index.html @@ -0,0 +1,3371 @@ + + + + + FOSS Foundations Info + + + + + + + + + + + + + +
+
+ +
+
+
+

FOSS Foundations Info

+
+
+
+ +
+
+

Foundation

+
+
+
+

getFoundationById

+

Get Foundation by exact lowercase string identifier.

+
+
+
+

+

Returns a single Foundation organizational model object for an exact identifier.

+

+
+
/_foundations/{foundationId}
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET\
+-H "Accept: application/json"\
+"https://raw.githubusercontent.com/Punderthings/fossfoundation/main/_foundations/{foundationId}.md"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.FoundationApi;
+
+import java.io.File;
+import java.util.*;
+
+public class FoundationApiExample {
+
+    public static void main(String[] args) {
+        
+        FoundationApi apiInstance = new FoundationApi();
+        String foundationId = foundationId_example; // String | Identifier of Foundation object to return; lowercase alpha string.
+        try {
+            Foundation result = apiInstance.getFoundationById(foundationId);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling FoundationApi#getFoundationById");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.FoundationApi;
+
+public class FoundationApiExample {
+
+    public static void main(String[] args) {
+        FoundationApi apiInstance = new FoundationApi();
+        String foundationId = foundationId_example; // String | Identifier of Foundation object to return; lowercase alpha string.
+        try {
+            Foundation result = apiInstance.getFoundationById(foundationId);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling FoundationApi#getFoundationById");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
String *foundationId = foundationId_example; // Identifier of Foundation object to return; lowercase alpha string.
+
+FoundationApi *apiInstance = [[FoundationApi alloc] init];
+
+// Get Foundation by exact lowercase string identifier.
+[apiInstance getFoundationByIdWith:foundationId
+              completionHandler: ^(Foundation output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var FossFoundationsInfo = require('foss_foundations_info');
+
+var api = new FossFoundationsInfo.FoundationApi()
+var foundationId = foundationId_example; // {{String}} Identifier of Foundation object to return; lowercase alpha string.
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.getFoundationById(foundationId, callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class getFoundationByIdExample
+    {
+        public void main()
+        {
+
+            var apiInstance = new FoundationApi();
+            var foundationId = foundationId_example;  // String | Identifier of Foundation object to return; lowercase alpha string.
+
+            try
+            {
+                // Get Foundation by exact lowercase string identifier.
+                Foundation result = apiInstance.getFoundationById(foundationId);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling FoundationApi.getFoundationById: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\ApiFoundationApi();
+$foundationId = foundationId_example; // String | Identifier of Foundation object to return; lowercase alpha string.
+
+try {
+    $result = $api_instance->getFoundationById($foundationId);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling FoundationApi->getFoundationById: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::FoundationApi;
+
+my $api_instance = WWW::SwaggerClient::FoundationApi->new();
+my $foundationId = foundationId_example; # String | Identifier of Foundation object to return; lowercase alpha string.
+
+eval { 
+    my $result = $api_instance->getFoundationById(foundationId => $foundationId);
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling FoundationApi->getFoundationById: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.FoundationApi()
+foundationId = foundationId_example # String | Identifier of Foundation object to return; lowercase alpha string.
+
+try: 
+    # Get Foundation by exact lowercase string identifier.
+    api_response = api_instance.get_foundation_by_id(foundationId)
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling FoundationApi->getFoundationById: %s\n" % e)
+
+
+ +

Parameters

+ +
Path parameters
+ + + + + + + + +
NameDescription
foundationId* + + +
+
+
+ + String + + +
+ Identifier of Foundation object to return; lowercase alpha string. +
+
+
+ Required +
+
+
+
+ + + + + +

Responses

+

Status: 200 - Successful operation; Foundation object returned.

+ + + +
+
+
+ +
+ +
+
+ +

Status: 400 - Invalid ID: does not map to existing Foundation

+ + + +
+
+ +

Status: 404 - Not Found ID: does not map to existing Foundation

+ + + +
+
+ +
+
+
+
+
+
+

getFoundations

+

Get list of available Foundation identifiers as lowercase strings.

+
+
+
+

+

Returns list of all valid identifiers, along with aliasOf values to map common names like 'org.apache' to 'asf'.

+

+
+
/_foundations/list.json
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET\
+-H "Accept: application/json"\
+"https://raw.githubusercontent.com/Punderthings/fossfoundation/main/_foundations/list.json"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.FoundationApi;
+
+import java.io.File;
+import java.util.*;
+
+public class FoundationApiExample {
+
+    public static void main(String[] args) {
+        
+        FoundationApi apiInstance = new FoundationApi();
+        try {
+            FoundationList result = apiInstance.getFoundations();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling FoundationApi#getFoundations");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.FoundationApi;
+
+public class FoundationApiExample {
+
+    public static void main(String[] args) {
+        FoundationApi apiInstance = new FoundationApi();
+        try {
+            FoundationList result = apiInstance.getFoundations();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling FoundationApi#getFoundations");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+

+FoundationApi *apiInstance = [[FoundationApi alloc] init];
+
+// Get list of available Foundation identifiers as lowercase strings.
+[apiInstance getFoundationsWithCompletionHandler: 
+              ^(FoundationList output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var FossFoundationsInfo = require('foss_foundations_info');
+
+var api = new FossFoundationsInfo.FoundationApi()
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.getFoundations(callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class getFoundationsExample
+    {
+        public void main()
+        {
+
+            var apiInstance = new FoundationApi();
+
+            try
+            {
+                // Get list of available Foundation identifiers as lowercase strings.
+                FoundationList result = apiInstance.getFoundations();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling FoundationApi.getFoundations: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
+
+$api_instance = new Swagger\Client\ApiFoundationApi();
+
+try {
+    $result = $api_instance->getFoundations();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling FoundationApi->getFoundations: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::FoundationApi;
+
+my $api_instance = WWW::SwaggerClient::FoundationApi->new();
+
+eval { 
+    my $result = $api_instance->getFoundations();
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling FoundationApi->getFoundations: $@\n";
+}
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
+
+# create an instance of the API class
+api_instance = swagger_client.FoundationApi()
+
+try: 
+    # Get list of available Foundation identifiers as lowercase strings.
+    api_response = api_instance.get_foundations()
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling FoundationApi->getFoundations: %s\n" % e)
+
+
+ +

Parameters

+ + + + + + +

Responses

+

Status: 200 - Successful operation; list returned.

+ + + +
+
+
+ +
+ +
+
+ +
+
+
+
+
+ +
+
+
+ + + + + + + + + diff --git a/openapi/v1/foundation-schema.yaml b/openapi/v1/foundation-schema.yaml new file mode 100644 index 0000000..90563c6 --- /dev/null +++ b/openapi/v1/foundation-schema.yaml @@ -0,0 +1,259 @@ +openapi: 3.0.0 +info: + version: 1.0.0 + title: FOSS Foundation metadata schema + description: Fields describing a FOSS foundation for https://fossfoundation.info/data +paths: {} +servers: + # Added by API Auto Mocking Plugin + - description: SwaggerHub API Auto Mocking + url: https://virtserver.swaggerhub.com/ShaneCurcuru/foundation-schema/1.0.0 +components: + schemas: + Foundation: + type: object + title: FOSS Foundation metadata schema + required: + - identifier + - commonName + - legalName + - website + - addressCountry + - nonprofitStatus + properties: + identifier: + title: Used as filename base or fragment reference within FOSSFoundation.info. + description: Shortest unique and human-recognizable reference to org; lowercased; used for lookups. + type: string + pattern: "^[a-z][a-z]*$" + commonName: + title: Common Name + description: Commonly used name in public. + type: string + legalName: + title: Legal Name + description: The official name of the organization, e.g. the registered company name. + type: string + description: + title: Description + description: One sentence brief overview of organization. + type: string + website: + title: Website + description: Primary website homepage that users would look for. + type: string + format: uri + foundingDate: + title: Founding Date + description: The date that this organization was legally founded. + type: string + format: date + dissolutionDate: + title: Dissolution Date + description: The date that this organization was legally dissolved (if applicable). + type: string + format: date + addressCountry: + title: Location + description: Country organization is incorporated in; ISO 3166-1 alpha-2. + type: string + pattern: "^[A-Z][A-Z]$" + addressRegion: + title: State + description: >- + State, Province, District, or similar region organization is incorporated in. + type: string + newProjects: + title: Accepts new projects? + description: Does this organization actively accept new projects for hosting? + type: string + softwareType: + title: Software Types + description: What general kind of software does this org create? May be 'various'. + type: string + wikidataId: + title: Wikidata ID + description: Wikidata ID for lookups. + type: string + pattern: '^Q[1-9]\d*$' + boardSize: + title: Board Size + description: Number of board of director seats. + type: number + boardType: + title: Board Type + description: >- + Approximate type of board: (non-paid) member elected; (paid) sponsor elected; appointed; self-perpetuating; etc. + type: string + boardurl: + title: Board Website + description: Official board information URL, typically with a list of directors. + type: string + format: url + bylawsurl: + title: Bylaws Website + description: Corporate bylaws URL. + type: string + format: url + numberOfEmployees: + title: Approx Number Of Paid Staff + description: Approximate number of paid employees or equivalents. + type: number + governanceOrg: + title: Governance Description + description: Brief description of corporate or organizational governance. + type: string + governanceTech: + title: Project Governance Description + description: Brief description of project-level technical governance. + type: string + projectsNotable: + title: Example Projects Hosted + description: Example list of highly notable software products. + type: string + projectsList: + title: Project List Website + description: Official URL listing of all sub-projects hosted. + type: string + format: url + projectsServices: + title: Services Provided + description: Brief description of services offered to hosted projects. + type: string + nonprofitStatus: + title: Nonprofit Type + description: "Specific type of non-profit; types: https://schema.org/NonprofitType" + type: string + taxID: + title: Tax Authority ID + description: US IRS EIN/TIN, or other country's tax identifier (if any). + type: string + taxIDLocal: + title: Local Tax Authority ID + description: Per-state, province, district, or similar tax identifier (if any). + type: string + budgetUsd: + title: Budget in USD + description: Approximate annual budget in USD; estimate. + type: string + budgetYear: + title: Budget Year + description: Fiscal year budgetUsd number was entered for. + type: string + budgeturl: + title: Budget Website + description: Official budget or other financial information URL. + type: string + format: url + budgetTransparent: + title: Budget Transparency + description: Is the official budget shared publicly and fully on a regular schedule? + type: string + funding: + title: Funding Sources + description: >- + Primary funding sources in rough order: (corporate) sponsors; (individual) donations; grants; other. + type: string + sponsorurl: + title: Sponsor List Website + description: Official listing of sponsors from a published sponsorship program URL. + type: string + format: url + sponsorList: + title: Example Sponsors + description: Example listing of top-level annual recurring sponsors from the most recent year. + type: string + sponsorships: + title: Sponsorship Program Model + description: >- + Filename base(s) of mappings defining sponsorship levels, listings, etc.; see sponsorships-schema.json + type: array + items: + type: string + uniqueItems: true + licenses: + title: Licenses Used + description: Licenses used on software provided if there is a policy; SPDX Identifiers or 'various'. + type: string + claPolicy: + title: CLA Policy + description: >- + Describe if the organization uses CLAs, DCOs, or other required incoming grants from contributors. + type: string + ethicsPolicy: + title: Ethics/COI Policy + description: Link to any primary ethics or COI policies posted. + type: string + format: url + conducturl: + title: Code Of Conduct Policy + description: Link to official Code of Conduct. + type: string + format: url + conductEvents: + title: Event Code Of Conduct Policy + description: Link to official event-related Code of Conduct. + type: string + format: url + conductSource: + title: Source Of Code Of Conduct + description: Cited source or inspiration for Code of Conduct policy. + type: string + conductLinked: + title: Where Code Of Conduct Linked + description: Describe where the Code of Conduct is linked from the website - footer, header, navigation, none? + type: string + diversityPolicy: + title: Diversity Policy Website + description: Diversity, inclusion, or other related policies or informational page. + type: string + format: url + diversityDescription: + title: Description Of Diversity Policy + description: Brief description of actual diversity, inclusion, or other related policies. + type: string + brandPrimary: + title: Primary Brand Name + description: What is the primary brand name/trademark of the organization? + type: string + brandSecondary: + title: Secondary Brand Name(s) + description: Example listing of any major secondary brand names/marks. + type: string + brandReg: + title: Is Primary Brand Registered? + description: >- + Is the primary brand a registered trademark in at least one jurisdiction? (yes/no/or major countries registered in). + type: string + brandPolicy: + title: Trademark Policy Website + description: Link to official trademark usage policies. + type: string + format: url + brandUse: + title: Trademark Usage Website + description: Link to official trademark FAQ or other policies. + type: string + format: url + brandComments: + title: Trademark Policy Description + description: Brief description of trademark usage policies. + type: string + logo: + title: Official Logo Link + description: Official organizational logo URL; prefer SVG when available. + type: string + format: url + logoReg: + title: Is Logo Registered? + description: >- + Is the official logo a registered trademark? (yes/no/or major countries registered in). + type: string + subOrganization: + title: Sub Entities Governed + description: Identifier(s) of any sub-foundations tracked in _entities data. + type: array + items: + type: string + pattern: "^[a-z][a-z]*$" + uniqueItems: true diff --git a/openapi/v1/openapi.yaml b/openapi/v1/openapi.yaml index 09d5e2f..164fbc9 100644 --- a/openapi/v1/openapi.yaml +++ b/openapi/v1/openapi.yaml @@ -1,87 +1,88 @@ openapi: 3.0.0 info: description: | - DRAFT DRAFT DRAFT Proposed OpenAPI spec for FOSS Foundations, providing read-only access to _foundations, _sponsorships, _entities. version: "1.0.0" title: FOSS Foundations Info - termsOfService: 'https://fossfoundation.info/colophon' + termsOfService: "https://fossfoundation.info/colophon" contact: + name: Shane Curcuru email: shane@punderthings.com license: name: Apache 2.0 - url: 'http://www.apache.org/licenses/LICENSE-2.0.html' + url: "http://www.apache.org/licenses/LICENSE-2.0.html" servers: # Added by API Auto Mocking Plugin - description: SwaggerHub API Auto Mocking url: https://virtserver.swaggerhub.com/ShaneCurcuru/FOSSFoundationInfo/1.0.0 - - description: FOSS Foundations raw GitHub access - url: 'https://raw.githubusercontent.com/Punderthings/fossfoundation/main/' + - description: FOSS Foundations raw GitHub access path. + url: "https://raw.githubusercontent.com/Punderthings/fossfoundation/main/" tags: - name: foundation description: Nonprofit FOSS Foundation Organization externalDocs: - description: Inclusion criteria and org schema - url: 'https://fossfoundation.info/data' + description: Foundation organization schema and inclusion criteria. + url: "https://fossfoundation.info/data" - name: entity description: Nonprofit FOSS Projects Or Entities externalDocs: - description: Inclusion criteria and entity schema - url: 'https://fossfoundation.info/entities' + description: Entity schema for major projects hosted at a foundation. + url: "https://fossfoundation.info/entities" - name: sponsorship description: Foundation Sponsorship Models externalDocs: - description: Inclusion criteria and org schema - url: 'https://fossfoundation.info/sponsorships' + description: Sponsorship model schema for foundations. + url: "https://fossfoundation.info/sponsorships" - name: tax description: Foundation Tax Finances Models externalDocs: - description: Inclusion criteria and org schema - url: 'https://fossfoundation.info/taxes' + description: Schema for simplistic tax finance modeling. + url: "https://fossfoundation.info/taxes" paths: /_foundations/list.json: get: tags: - foundation - summary: Get list of available Foundation ids. - description: Returns list of all ids, along with naming metadata hints for external lookups. + summary: Get list of available Foundation identifiers as lowercase strings. + description: Returns list of all valid identifiers, along with aliasOf values to map common names like 'org.apache' to 'asf'. operationId: getFoundations responses: - '200': - description: successful operation + "200": + description: Successful operation; list returned. content: application/json: schema: - $ref: '#/components/schemas/FoundationList' - '/_foundations/{foundationId}': + $ref: "#/components/schemas/FoundationList" + "/_foundations/{foundationId}": get: tags: - foundation - summary: Get Foundation by id. - description: Returns a single Foundation organizational model object. + summary: Get Foundation by exact lowercase string identifier. + description: Returns a single Foundation organizational model object for an exact identifier. operationId: getFoundationById parameters: - name: foundationId in: path - description: ID of Foundation object to return + description: Identifier of Foundation object to return; lowercase alpha string. required: true schema: type: string + pattern: "^[a-z][a-z]*$" responses: - '200': - description: successful operation + "200": + description: Successful operation; Foundation object returned. content: application/json: schema: - $ref: '#/components/schemas/Foundation' - '400': - description: 'Invalid ID: does not map to existing Foundation' - '404': - description: 'Not Found ID: does not map to existing Foundation' + $ref: "#/components/schemas/Foundation" + "400": + description: "Invalid ID: does not map to existing Foundation" + "404": + description: "Not Found ID: does not map to existing Foundation" externalDocs: - description: See the FOSS Foundations metadata directory standards. - url: 'https://fossfoundation.info/data' + description: See the FOSS Foundations metadata directory standards and description. + url: "https://fossfoundation.info/data" components: schemas: FoundationList: @@ -100,24 +101,4 @@ components: additionalProperties: type: string Foundation: - type: object - required: - - identifier - - commonName - - website - properties: - identifier: - type: string - description: short lookup identifier - example: asf - commonName: - type: string - description: Commonly used name of the organization. - example: Apache Software Foundation - website: - type: string - description: website homepage - foundingDate: - type: string - description: date organization legally founded - format: date \ No newline at end of file + $ref: "https://raw.githubusercontent.com/Punderthings/fossfoundation/main/openapi/v1/foundation-schema.yaml"