Skip to content

Generated OpenAPI document fails SAP Core v1 validation with default values #135

@zongqichen

Description

@zongqichen

Description

When generating an OpenAPI document without providing all required CDS annotations, the default/placeholder values cause SAP Core v1 policy validation errors in the API Metadata Validator.

Errors

1. sap-oas-short-text-chars (ERROR)

  • Line: 10
  • Rule: The short text must not contain special characters
  • Current value:
    "x-sap-shortText": "Use @Core.Description: '...' on your CDS service to provide a meaningful short text."
  • Problem: The placeholder text contains special characters (: and ')

2. sap-oas3-security (ERROR)

  • Line: 1114
  • Rule: The security definition is missing
  • Problem: No security or securitySchemes defined in the generated OpenAPI document

Expected Behavior

The generated OpenAPI document should pass SAP Core v1 validation, or at minimum the default/placeholder values should not introduce validation errors.

Environment

  • @cap-js/openapi: 1.3.1
  • Policy Level: SAP Core v1 (Stable, recommended)
  • Document Type: OpenAPI 3.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions