Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

rest - Generate RAML file for existing API in Java

I am new to RAML and I am looking for a tool or any way by which I can create the RAML file by passing few details. It will take a lot of time if I try to write RAML files for existing API manually.

Below is the desired RAML file format.

%RAML 1.0
baseUri: https://api.test.com/abc
title: Test
version: v1

traits:
     id-required:
      headers:
       id:
        type: string
       secret:
        type: string

/test/:
  description:Test  API
  post:
    is: [id-required]
    description: Test  
    body: 
      application/json:
        example: !include examples/TestRequest.json
        type: !include schemas/TestRequestSchema.json
    responses: 
      200:
        body:
          application/json:
            example: !include examples/TestResponse.json
            type: !include schemas/TestResponseSchema.json
      400:
        body: 
          application/json:
            example: !include examples/TestErrorResponse.json
            type: !include schemas/TestResponseSchema.json

Thanks, Rachana


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...