Skip to content

Commit

Permalink
Merge pull request #18 from niveathika/main
Browse files Browse the repository at this point in the history
Reformat
  • Loading branch information
niveathika authored Jul 3, 2024
2 parents 7638f3f + 799c17d commit ee2de33
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Fixes:
## Examples

## Checklist

- [ ] Linked to an issue
- [ ] Updated the specification
- [ ] Updated the changelog
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ Execute the commands below to build from the source.
./gradlew clean :sales-ballerina:<api_name>:build
```

| API Name | Connector |
|-----------------------|-----------------------------------------------|
| api_salesdistrict_srv | ballerinax/sap.s4hana.api_salesdistrict_srv |
| api_salesorganization_srv | ballerinax/sap.s4hana.api_salesorganization_srv |
| api_sales_order_srv | ballerinax/sap.s4hana.api_sales_order_srv |
| API Name | Connector |
|---------------------------|-------------------------------------------------|
| api_salesdistrict_srv | ballerinax/sap.s4hana.api_salesdistrict_srv |
| api_salesorganization_srv | ballerinax/sap.s4hana.api_salesorganization_srv |
| api_sales_order_srv | ballerinax/sap.s4hana.api_sales_order_srv |
| api_sd_sa_soldtopartydetn | ballerinax/sap.s4hana.api_sd_sa_soldtopartydetn |

5. To run tests against different environment:
Expand Down Expand Up @@ -125,8 +125,7 @@ Execute the commands below to build from the source.

As an open-source project, Ballerina welcomes contributions from the community.

For more information, go to
the [contribution guidelines](https://github.com/ballerina-platform/ballerina-lang/blob/master/CONTRIBUTING.md).
For more information, go to the [contribution guidelines](https://github.com/ballerina-platform/ballerina-lang/blob/master/CONTRIBUTING.md).

## Code of conduct

Expand All @@ -137,5 +136,4 @@ All the contributors are encouraged to read the [Ballerina Code of Conduct](http
* For more information go to the [`sap` package](https://lib.ballerina.io/ballerinax/sap/latest).
* For example demonstrations of the usage, go to [Ballerina By Examples](https://ballerina.io/learn/by-example/).
* Chat live with us via our [Discord server](https://discord.gg/ballerinalang).
* Post all technical questions on Stack Overflow with
the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag.
* Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag.
1 change: 0 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed


## sap.s4hana.api_sd_sa_soldtopartydetn

## [Unreleased]
Expand Down
24 changes: 12 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ _Edition_: Swan Lake
## Sanitization Steps

1. Move inline enum parameters to schemas. This simplifies function definitions and enhances documentation. Schema names
are generated based on the following pattern:
are generated based on the following pattern:
`${The Resource Name}Of${Base Path Name}`

2. Remove unnecessary grouping prefixes from schema names. For example:
`Api_sales_contract_srvA_Salesorder` -> `A_Salesorder`
2. Remove unnecessary grouping prefixes from schema names. For example:
`Api_sales_contract_srvA_Salesorder` -> `A_Salesorder`
`com\.sap\.gateway\.srvd_a2x\.api_defect\.v0001\.Defect_Type` -> `Defect`

3. Improve response schema names by removing unnecessary prefixes and suffixes and renaming them to be more descriptive.
`wrapper` -> `A_InspectionlotWrapper`
3. Improve response schema names by removing unnecessary prefixes and suffixes and renaming them to be more descriptive.
`wrapper` -> `A_InspectionlotWrapper`
`Collection of A_InspectionlotType` -> `CollectionOfA_Inspectionlot`

4. Change parameter name to start with lowercase if the response schema is also named the same.
Expand Down Expand Up @@ -64,11 +64,11 @@ _Edition_: Swan Lake
```

5. Add operation Ids. This is more user-friendly with SAP-specific scripts. The logic for parameter sanitization is
reused, making it less complicated for the tool. The pattern is as follows:
`${HTTP Method}${The Resource Name}Of${Base Path Name}`
reused, making it less complicated for the tool. The pattern is as follows:
`${HTTP Method}${The Resource Name}Of${Base Path Name}`
`/salesorder(asdad)/to_Item` => `getTo_ItemOfSalesorder`

Exceptions: /rejectApprovalRequest, /releaseApprovalRequest, /$batch
Exceptions: /rejectApprovalRequest, /releaseApprovalRequest, /$batch

## Sanitization for SAP S/4HANA OpenAPI Generated Client

Expand Down Expand Up @@ -96,7 +96,7 @@ _Edition_: Swan Lake

5. Add the `<API_NAME>.json` file under the `docs/spec` directory.

**Note**: Following scripts need to be run within the docs folder.
**Note**: Following scripts need to be run within the `docs` folder.

6. Run `bal run sanitation/sanitations.bal -- "<API Name>"`

Expand All @@ -118,8 +118,8 @@ _Edition_: Swan Lake
11. Generate mock server under `modules/mock` folder.
```ballerina
bal openapi -i spec/<API_NAME>_MOCK.json -o ../ballerina/<Module Name>/modules/mock --mode service --license license.txt
```
```ballerina
bal openapi -i spec/<API_NAME>_MOCK.json -o ../ballerina/<Module Name>/modules/mock --mode service --license license.txt
```
12. Ensure the test cases are written against mock and live servers, with `isTestOnLiveServer` as the param to switch.

0 comments on commit ee2de33

Please sign in to comment.