Skip to content

Commit

Permalink
Merge pull request #190 from microsoft/documentation
Browse files Browse the repository at this point in the history
Updated documentation and added a codemodel test for collections
  • Loading branch information
baywet authored May 31, 2021
2 parents b0ffef8 + 33843f3 commit 19b1115
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
10 changes: 9 additions & 1 deletion docs/corelibrary.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# Core Library
# Core Libraries

Kiota attempts to minimizing the amount of generated code to decrease processing time and reduce the binary footprint of the SDKs. In order to achieve this, we attempt to put as much code as a possible into the core library.

Kiota ships with a default set of core libraries, currently available for CSharp, Java and TypeScript. These are simply default implementations. Replacing these core libraries with ones optimized for your scenarios is a completly supported scenario.

The core libraries takes care of all generic processing of HTTP requests. The service library that Kiota generates is designed to create a strongly typed layer over the core libraries to simplify the process of creating requests and consuming responses.

In order to implement a custom core library, it is necessary to implement the interfaces defined in the Kiota [Abstractions](kiotaabstractions) library.
7 changes: 5 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

Kiota is an OpenAPI based code generator for creating SDKs for HTTP APIs. The goal is to produce a lightweight, low maintenance, code generator that is fast enough to run as part of the compile time tool-chain but scalable enough to handle the largest APIs.

Current SDK tooling assumes that consumers of the API want to consume API resources using the same boundaries as the teams that provide the APIs. However, that is often not the case. Many companies are beginning to use API Management gateways and portals to bring APIs across their organization together and provide a coherent and consistent experience across many APIs. However, SDKs continue to be shipped based on the team that provided the API. HTTP URI spaces allow for seamless integration of many APIs into a coherent whole. SDK tooling should enable the same level of integration.
For those looking to try it out rather than hearing why we built it, checkout out the [Getting Started](https://github.com/microsoft/kiota#getting-started) section.

Current SDK tooling forces the API provider to make choices about the granularity of how API consumers want to consume their APIs. However you can't please everyone. Some devs building mobile applications care deeply about binary footprint and want SDKs that only contain what they need. Other developers building enterprise experiences don't want have to worry about finding which one in a dozen SDKs contain the feature they are looking for. Many companies are beginning to use API Management gateways and portals to bring APIs across their organization together and provide a coherent and consistent experience across many APIs. However, traditional SDKs continue to be shipped based on the team that provided the API. Kiota has the flexibility to quickly and easily build SDKs the shape and size that our customers need regardless of size. Conway's law doesn't apply here.

### Goals

Expand Down Expand Up @@ -75,6 +77,7 @@ For more information on the various components used by the Kiota SDK, see the fo

- [Request Builders](requestbuilders)
- [Models](models)
- [Abstractions](kiotaabstractions)
- [Core Library](corelibrary)

For an overview of how the code generation process works, see the [Design Overview](designoverview). This library was created to support the [Microsoft Graph](microsoftgraph) API and therefore needs to support a number of [OData](odata) conventions.
For an overview of how the code generation process works, see the [Design Overview](designoverview).
2 changes: 2 additions & 0 deletions docs/kiotaabstractions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ The HTTP core interface is the primary point where Kiota service libraries will
```csharp
public interface IHttpCore {
Task<ModelType> SendAsync<ModelType>(RequestInfo requestInfo, IResponseHandler responseHandler = default);
Task<ModelType> SendPrimitiveAsync<ModelType>(RequestInfo requestInfo, IResponseHandler responseHandler = default);
Task SendNoContentAsync(RequestInfo requestInfo, IResponseHandler responseHandler = default);
}
```

Expand Down
4 changes: 4 additions & 0 deletions tests/Kiota.Builder.IntegrationTests/ToDoApi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ info:
paths:
/todos:
get:
description: Return a list of Todo entities
operationId: todos_ListTodos
parameters:
- name: active
Expand All @@ -25,6 +26,7 @@ paths:
type: object
properties:
value:
type: array
items:
$ref: "#/components/schemas/todo"

Expand All @@ -41,10 +43,12 @@ paths:
description: OK
/todos/{todoId}:
get:
description: Return a single Todo object
responses:
'200':
description: OK
delete:
description: Delete a single Todo object
responses:
'200':
description: OK
Expand Down

0 comments on commit 19b1115

Please sign in to comment.