Skip to content

Commit

Permalink
docs: add missing files (#57)
Browse files Browse the repository at this point in the history
Signed-off-by: Adi Bhagavath <adibhagawath@gmail.com>
  • Loading branch information
adi-a11y authored Mar 12, 2024
1 parent 58a6dc0 commit 0f73689
Show file tree
Hide file tree
Showing 232 changed files with 39,518 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.DS_Store
node_modules
package-lock.json
8 changes: 8 additions & 0 deletions docs/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "mobility-core"]
path = mobility-core
url = https://github.com/beckn/mobility.git
branch = main
[submodule "beckn-core"]
path = beckn-core
url = https://github.com/beckn/protocol-specifications.git
branch = master
9 changes: 9 additions & 0 deletions docs/Committee.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ONDC Mobility Committee

* [Sujith Nair](#TODO)
* [Ravi Prakash](#TODO)
* [Abhishek Singh](#TODO)
* [Neeraj Jain](#TODO)
* [Nitin Nair](#TODO)
* [Shreyansh Shah](#TODO)
* [Rupal Singla](#TODO)
Binary file added docs/Error-codes.xlsx
Binary file not shown.
72 changes: 72 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# ONDC Mobility Specification

These specifications are to enable ONDC Network Participants to expose or consume mobility services on ONDC.

ONDC mobility specification is an adaptation of [beckn mobility specifications](https://github.com/beckn/mobility).

These specifications will be released in multiple phases enabling different use case and enhancements.

ONDC mobility specification swagger [link](https://ondc-official.github.io/mobility-specification/)

## Latest Version

[v2.0.0](https://github.com/ONDC-Official/mobility-specification/releases/tag/v1.0.0)

## Earlier Versions

| Version | Release Date | beckn Version | Comments |
| ------- | ------------ | ---------------------------------- | ------------------------------------------------------------------ |
| v1.0.0 | 14 Jun 2023 | core - 0.9.4<br />mobility - 0.8.2 | Initial mobility specification for on-demand ride hailing use case |
| v2.0.0 | 19 Feb 2024 | core - 1.2.0 | Base version of mobility for ride hailing is completed |

## Introduction

Open Network for Digital Commerce (ONDC) is a network based on beckn open protocol and will enable local commerce across segments, such as mobility, retail etc, to be discovered and engaged by any network-enabled application.

ONDC mobility & travel aims to build a nationwide multi-modal network that provides seamless experiences, supports growth & innovation by,

* bringing together a diverse set of mobility, travel & transportation players who can engage with the open network on their own terms
* fostering collaboration, sharing & new models
* facilitating responsive policy by bringing onboard decision making authorities

In the mobility space, the intent is to enable seamless and truly multimodal transit options by bringing in diverse inventory onboard at scale that will serve the country’s population.

This would be possible in the mobility domain by making sure all mobility apps in the network are built in such a way as to enable them to communicate with each other in the same language.

## Enabled/Supported use cases on network

* On-demand Ride hailing with fix pick-up and drop locations for transport modes : Car, Autorickshaw, Motorcycle
* Auto assignment of driver on on_confirm.
* Auto assignment of driver post on_confirm.
* Soft/Hard cancellation of ride.

## Evolution

The evolution of ONDC mobility specification driven by 2 factors:

1. The beckn mobility and/or core specification evolution.
2. ONDC Network Participants recommendation and requirement for enhancing and expanding the network use cases & experience.

To know more about how the specification evolves, visit the Network GOVERNANCE document.

To follow discussions related to the mobility specification please visit the [Discussions Forum](https://github.com/ONDC-Official/mobility-specification/discussions) on GitHub

Each major release of ONDC mobility specification will be approved by ONDC mobility working group members for which are listed [here](./Committee.md)

For minor releases for bug fix and cosmetic changes ONDC would make a minor release based on internal approval process and update the committee in the next scheduled discussion.

## Contribution

### Contribution to specifications

Anyone can contribute to the specification. Please refer beckn contribution guidelines.

### Contribution to network

Anyone can contribute to the network enhancements. Contributors must follow the contribution guidelines.

Each contribution will be peer-reviewed by the ONDC mobility committee members. If approved, this contribution will be merged with the applicable versions of the specification.

#### What is Contribution to network

Addition/Modification of examples, enum, policies which are very specific to the networks scope and purview.
79 changes: 79 additions & 0 deletions docs/Usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# API Contract

The API Contract document is part of the repository as a static index.html. Once the repo is checked out any user can go ahead and open this index.html into their repo and visualise the information of the repo in a Visual API contract format. Alternate to this user can also look into github pages here to visualise the current master specification.

# Repository Structure

**Note:** All folders mentioned here are relative to the root folder `protocol-specs`

The full specification can be found at `api/build/build.yaml`

This is an autogenerated file created by compiling multiple sets of components namely,

1. Enum: found at `api/components/enum/`
* These are all the enums used in specification while creating the artifact
2. Tags: found at `api/components/tags/`
* These are all the tags/taggroups used in specification while creating the artifact
3. Examples: found at `api/components/examples/`
* These are the examples created Illustrative use of the specification and embeeded in the yaml
* Structure `api/components/examples/{module/feature/use case}/{API_Folder}/example_{#}.yaml`
4. Unresolved YAML: found at `api/components/beck_yaml.yaml`

## Diagaram

```
/ (root directory)
|
|--beckn-core (git submodule to specific beckn inheritated release)
|--api (contains all the api specific details)
| |--build
| | |--build.yaml (Built Single YAML with api specification)
| |--components (contains all components of the specification)
| | |--enum (contains all enums used in module)
| | | |--index.yaml (index yaml)
| | | |--{schema}.yaml (dictionary yaml)
| | |--examples (conatins examples of the APIs)
| | | |--(theme/usecase/base/behaviour)
| | | | |--search (search request examples yaml)
| | | | | |--example_0.yaml (example_0 yaml)
| | |--tags (contains Tags all tags used in module)
| | | |--tag-group.yaml (Tag Group Yaml)
| | | |--tag.yaml (tag yaml)
| | | |--index.yaml (tag index yaml)
| | |--flows (contains illustrative flows module)
| | | |--(theme/usecase/base/behaviour)
| | | | |--index.yaml (specific flow yaml)
| | | |--index.yaml (flows index yaml)
| | |--beck_yaml.yaml (unresolved yaml to build final yaml)
| | |--docs (documents associated with specification)
| | | |--attribute.md (Attribute to business terminology mapping)description)
```

# Setup steps

## Pre-requisite

### Install swagger CLI

- Install the swagger command line tool using ``npm`` (Note: you may need to use root privileges if installing it globally)

```
sudo npm install -g swagger-cli
```

## Generate the resolved OpenAPI illustration viewer file

- Run the following command

```
cd ./api/components
node app
```

- If the command runs successfully, you should see an output like this,

```
Created temp.yaml from ./beckn_yaml.yaml
Temporary file deleted
```
Loading

0 comments on commit 0f73689

Please sign in to comment.