You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we are mapping the OpenAPI Specification (OAS) summary to the Ballerina service and client API documentation. When the Ballerina service or client has API documentation, we map it to the OAS summary.
We have observed inconsistent mapping between the OAS and Ballerina. If the user provides only a description, it is mapped as API documentation, which can be problematic when generating OAS for that specific service. This inconsistency may lead to the description being mapped to the summary instead of the intended description field in the OAS.
Solution:
Use only the summary for OAS-to-Ballerina service generation and Ballerina service-to-OAS mapping.
If the summary is absent, API documentation will not be generated.
Steps to Reproduce
Use the below OAS and generate the Ballerina service, using bal openapi -i <yml> --mode service
openapi: 3.0.0
info:
title: Sample API
description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML.
version: 0.1.9
servers:
- url: http://api.example.com/v1
description: Optional server description, e.g. Main (production) server
- url: http://staging-api.example.com
description: Optional server description, e.g. Internal staging server for testing
paths:
/users:
get:
summary: Returns a list of users.
description: Optional extended description in CommonMark or HTML.
responses:
"200": # status code
description: A JSON array of user names
content:
application/json:
schema:
type: array
items:
type: string
**Note: Please make sure to check with both the service contract type and service declaration node
Version
2201.10.1
Environment Details (with versions)
No response
The text was updated successfully, but these errors were encountered:
lnash94
changed the title
Make consistence with the openapi:ResourceConfig{} and ballerina resource API documentation Mapping
Make consistence with the ballerina resource API documentation Mapping for OAS to Service generation and Service to OAS generation
Nov 6, 2024
Description
Currently, we are mapping the OpenAPI Specification (OAS) summary to the Ballerina service and client API documentation. When the Ballerina service or client has API documentation, we map it to the OAS summary.
We have observed inconsistent mapping between the OAS and Ballerina. If the user provides only a description, it is mapped as API documentation, which can be problematic when generating OAS for that specific service. This inconsistency may lead to the description being mapped to the summary instead of the intended description field in the OAS.
Solution:
Steps to Reproduce
Use the below OAS and generate the Ballerina service, using
bal openapi -i <yml> --mode service
**Note: Please make sure to check with both the service contract type and service declaration node
Version
2201.10.1
Environment Details (with versions)
No response
The text was updated successfully, but these errors were encountered: