How do I define reusable link in swagger correctly?










0














I am using swagger with Open API 3.0.0



Following is my Api definition:



paths:
/offerers:
get:
summary: give all offerers back
operationId: allOfferers
description: give you all offerers back
responses:
'200':
description: oferers results
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OfferersId'
links:
GetSingleOffererById:
$ref: '#/components/links/GetSingleOffererById'
'400':
description: something went terribly wrong
/offerers/offererId:
parameters:
- in: path
name: offererId
schema:
$ref: '#/components/schemas/OfferersId'
required: true
get:
parameters:
- $ref: '#/components/schemas/OfferersId'
summary: give one specified offerer back
operationId: singleOfferer
description: give one offerer back. Specified by its id
responses:
'200':
description: offerers results
content:
application/json:
schema:
$ref: '#/components/schemas/Offerers'
'400':
description: something went terribly wrong

components:
schemas:
OfferersId:
type: number
example: 123
Offerers:
type: object
required:
- offererId
- name
properties:
id:
$ref: '#/components/schemas/OfferersId'
name:
type: string
example: "Mark Mustermann"
location:
type: string
example: "90449 Nürnberg"
experience:
type: string
example: "8 Jahre"
openingHours:
type: string
example: "Werktags: 10:15-18:30/tWochenende: geschlossen."

links:
GetSingleOffererById:
operationId: singleOfferer
description: the offererId in the response will be used as offererId in the request
paramters:
offererId: $reponse.body#/OfferersId


Most of this Definition is error free. But the last section components/links gives me an error at line "operationId: singleOfferer":




should NOT have additional properties additionalProperty: operationId,
paramters




So my question:
How do I have to correct my definition, so that the reusable link is valid?










share|improve this question



















  • 1




    Typo: paraMTers -> paraMETers
    – Helen
    Nov 12 at 8:56










  • # facepalm # THANK YOU!!! How do I reward a comment?
    – Tagamoga
    Nov 12 at 9:00
















0














I am using swagger with Open API 3.0.0



Following is my Api definition:



paths:
/offerers:
get:
summary: give all offerers back
operationId: allOfferers
description: give you all offerers back
responses:
'200':
description: oferers results
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OfferersId'
links:
GetSingleOffererById:
$ref: '#/components/links/GetSingleOffererById'
'400':
description: something went terribly wrong
/offerers/offererId:
parameters:
- in: path
name: offererId
schema:
$ref: '#/components/schemas/OfferersId'
required: true
get:
parameters:
- $ref: '#/components/schemas/OfferersId'
summary: give one specified offerer back
operationId: singleOfferer
description: give one offerer back. Specified by its id
responses:
'200':
description: offerers results
content:
application/json:
schema:
$ref: '#/components/schemas/Offerers'
'400':
description: something went terribly wrong

components:
schemas:
OfferersId:
type: number
example: 123
Offerers:
type: object
required:
- offererId
- name
properties:
id:
$ref: '#/components/schemas/OfferersId'
name:
type: string
example: "Mark Mustermann"
location:
type: string
example: "90449 Nürnberg"
experience:
type: string
example: "8 Jahre"
openingHours:
type: string
example: "Werktags: 10:15-18:30/tWochenende: geschlossen."

links:
GetSingleOffererById:
operationId: singleOfferer
description: the offererId in the response will be used as offererId in the request
paramters:
offererId: $reponse.body#/OfferersId


Most of this Definition is error free. But the last section components/links gives me an error at line "operationId: singleOfferer":




should NOT have additional properties additionalProperty: operationId,
paramters




So my question:
How do I have to correct my definition, so that the reusable link is valid?










share|improve this question



















  • 1




    Typo: paraMTers -> paraMETers
    – Helen
    Nov 12 at 8:56










  • # facepalm # THANK YOU!!! How do I reward a comment?
    – Tagamoga
    Nov 12 at 9:00














0












0








0







I am using swagger with Open API 3.0.0



Following is my Api definition:



paths:
/offerers:
get:
summary: give all offerers back
operationId: allOfferers
description: give you all offerers back
responses:
'200':
description: oferers results
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OfferersId'
links:
GetSingleOffererById:
$ref: '#/components/links/GetSingleOffererById'
'400':
description: something went terribly wrong
/offerers/offererId:
parameters:
- in: path
name: offererId
schema:
$ref: '#/components/schemas/OfferersId'
required: true
get:
parameters:
- $ref: '#/components/schemas/OfferersId'
summary: give one specified offerer back
operationId: singleOfferer
description: give one offerer back. Specified by its id
responses:
'200':
description: offerers results
content:
application/json:
schema:
$ref: '#/components/schemas/Offerers'
'400':
description: something went terribly wrong

components:
schemas:
OfferersId:
type: number
example: 123
Offerers:
type: object
required:
- offererId
- name
properties:
id:
$ref: '#/components/schemas/OfferersId'
name:
type: string
example: "Mark Mustermann"
location:
type: string
example: "90449 Nürnberg"
experience:
type: string
example: "8 Jahre"
openingHours:
type: string
example: "Werktags: 10:15-18:30/tWochenende: geschlossen."

links:
GetSingleOffererById:
operationId: singleOfferer
description: the offererId in the response will be used as offererId in the request
paramters:
offererId: $reponse.body#/OfferersId


Most of this Definition is error free. But the last section components/links gives me an error at line "operationId: singleOfferer":




should NOT have additional properties additionalProperty: operationId,
paramters




So my question:
How do I have to correct my definition, so that the reusable link is valid?










share|improve this question















I am using swagger with Open API 3.0.0



Following is my Api definition:



paths:
/offerers:
get:
summary: give all offerers back
operationId: allOfferers
description: give you all offerers back
responses:
'200':
description: oferers results
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OfferersId'
links:
GetSingleOffererById:
$ref: '#/components/links/GetSingleOffererById'
'400':
description: something went terribly wrong
/offerers/offererId:
parameters:
- in: path
name: offererId
schema:
$ref: '#/components/schemas/OfferersId'
required: true
get:
parameters:
- $ref: '#/components/schemas/OfferersId'
summary: give one specified offerer back
operationId: singleOfferer
description: give one offerer back. Specified by its id
responses:
'200':
description: offerers results
content:
application/json:
schema:
$ref: '#/components/schemas/Offerers'
'400':
description: something went terribly wrong

components:
schemas:
OfferersId:
type: number
example: 123
Offerers:
type: object
required:
- offererId
- name
properties:
id:
$ref: '#/components/schemas/OfferersId'
name:
type: string
example: "Mark Mustermann"
location:
type: string
example: "90449 Nürnberg"
experience:
type: string
example: "8 Jahre"
openingHours:
type: string
example: "Werktags: 10:15-18:30/tWochenende: geschlossen."

links:
GetSingleOffererById:
operationId: singleOfferer
description: the offererId in the response will be used as offererId in the request
paramters:
offererId: $reponse.body#/OfferersId


Most of this Definition is error free. But the last section components/links gives me an error at line "operationId: singleOfferer":




should NOT have additional properties additionalProperty: operationId,
paramters




So my question:
How do I have to correct my definition, so that the reusable link is valid?







hyperlink swagger openapi






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 at 14:45









Ace

610320




610320










asked Nov 12 at 8:51









Tagamoga

15915




15915







  • 1




    Typo: paraMTers -> paraMETers
    – Helen
    Nov 12 at 8:56










  • # facepalm # THANK YOU!!! How do I reward a comment?
    – Tagamoga
    Nov 12 at 9:00













  • 1




    Typo: paraMTers -> paraMETers
    – Helen
    Nov 12 at 8:56










  • # facepalm # THANK YOU!!! How do I reward a comment?
    – Tagamoga
    Nov 12 at 9:00








1




1




Typo: paraMTers -> paraMETers
– Helen
Nov 12 at 8:56




Typo: paraMTers -> paraMETers
– Helen
Nov 12 at 8:56












# facepalm # THANK YOU!!! How do I reward a comment?
– Tagamoga
Nov 12 at 9:00





# facepalm # THANK YOU!!! How do I reward a comment?
– Tagamoga
Nov 12 at 9:00













1 Answer
1






active

oldest

votes


















1














"should NOT have additional properties" error in the Swagger Editor usually means one of the following:



  1. a keyword is misspelt,

  2. syntax/structure is incorrect.

In your example it's (1) - paraMTers should be paraMETers.






share|improve this answer




















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53258606%2fhow-do-i-define-reusable-link-in-swagger-correctly%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    "should NOT have additional properties" error in the Swagger Editor usually means one of the following:



    1. a keyword is misspelt,

    2. syntax/structure is incorrect.

    In your example it's (1) - paraMTers should be paraMETers.






    share|improve this answer

























      1














      "should NOT have additional properties" error in the Swagger Editor usually means one of the following:



      1. a keyword is misspelt,

      2. syntax/structure is incorrect.

      In your example it's (1) - paraMTers should be paraMETers.






      share|improve this answer























        1












        1








        1






        "should NOT have additional properties" error in the Swagger Editor usually means one of the following:



        1. a keyword is misspelt,

        2. syntax/structure is incorrect.

        In your example it's (1) - paraMTers should be paraMETers.






        share|improve this answer












        "should NOT have additional properties" error in the Swagger Editor usually means one of the following:



        1. a keyword is misspelt,

        2. syntax/structure is incorrect.

        In your example it's (1) - paraMTers should be paraMETers.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 12 at 9:21









        Helen

        32.4k473127




        32.4k473127



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53258606%2fhow-do-i-define-reusable-link-in-swagger-correctly%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            How to read a connectionString WITH PROVIDER in .NET Core?

            In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

            Museum of Modern and Contemporary Art of Trento and Rovereto