About 468,000 results
Open links in new tab
  1. How to define an array of objects in OpenAPI 3.0?

    Sep 4, 2020 · I'm trying to add an object in an array, but this seems not be possible. I've tried the following, but I get always the error: Property Name is not allowed. This is shown for all items …

  2. json - POST array of objects to REST API - Stack Overflow

    Oct 24, 2014 · I'm designing REST API that should be able to accept array of objects, say [ { 'name': 'Alice', 'age': 15 }, { 'name': 'Bob', 'age': 20 }, ... Indeed, the API could have a method …

  3. Data Types | Swagger Docs

    Objects. An object is a collection of property/value pairs. The properties keyword is used to define the object properties – you need to list the property names and specify a schema for each …

  4. OpenAPI Array of Objects - APIMatic

    Jan 3, 2024 · In OpenAPI, you can define arrays of objects in various ways using the type as array and the property items. You can define them inline or utilize referenced components. …

  5. Should I use an array or an object for REST API collections?

    Jan 5, 2015 · This is a general question to know which one looks more like a "best practice", with no assumption on how the clients are querying/using the REST API. You are writing a REST …

  6. Openapi Array Of Objects Example - Eddymens

    In this post, I am going to transform the above JSON into an OpenAPI request body structure. First, we create the individual book objects thus converting {"title": "Harry Potter"} and {"title": …

  7. Define an Array of Varying Types in OpenAPI - Baeldung

    Jan 8, 2024 · There are three ways to define an array that can contain both of these objects: the keywords oneOf, anyOf, and the arbitrary type schema. The oneOf keyword specifies that the …

  8. How to have examples for an object which has an array of objects

    Nov 18, 2022 · Multiple schema-level examples are supported in OpenAPI 3.1. They must be inline example values and cannot be $refs. ... components: schemas: MyObject: type: object …

  9. Dictionaries, HashMaps and Associative Arrays | Swagger Docs

    A dictionary (also known as a map, hashmap or associative array) is a set of key/value pairs. OpenAPI lets you define dictionaries where the keys are strings . To define a dictionary, use …

  10. How to reference array item examples in OpenAPI 3?

    Apr 15, 2018 · Use allOf for arrays. components: schemas: AllContacts: type: array items: $ref: '#/definitions/ContactModel1' example: allOf: - $ref: '#/components/examples/Homes' - $ref: …

  11. Some results have been removed
Refresh