def operations_person_create_person(body=None): # noqa: E501 """operations_person_create_person Creates a new Person # noqa: E501 :param body: :type body: dict | bytes :rtype: None """ if connexion.request.is_json: body = Person.from_dict(connexion.request.get_json()) # noqa: E501 return swagger_server.services.person.createperson(body)
def persons_post(person=None): # noqa: E501 """Creates a person Adds a new person to the persons list. # noqa: E501 :param person: The person to create. :type person: dict | bytes :rtype: None """ if connexion.request.is_json: person = Person.from_dict(connexion.request.get_json()) # noqa: E501 return 'do some magic!'
def persons_post(person=None): # noqa: E501 """Creates a person. Adds a new person to the person list. # noqa: E501 :param person: The person to create. :type person: dict | bytes :rtype: None """ if connexion.request.is_json: person = Person.from_dict(connexion.request.get_json()) # noqa: E501 persons_list.append(person) return Response(mimetype='application/json', status=204)