IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] 無印良品「レトルトカレー」売上ランキング 3位「グリーン」、2位「牛バラ肉の大盛りカレー」、1位は? |
https://www.itmedia.co.jp/business/articles/2307/03/news113.html
|
itmedia |
2023-07-03 15:46:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia Mobile] 中古スマホは「iPhone SE(第2、3世代)」が上位独占、「AQUOS sense2」が浮上 ムスビーの6月ランキング |
https://www.itmedia.co.jp/mobile/articles/2307/03/news124.html
|
android |
2023-07-03 15:22:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia PC USER] WD、PS5用のPCIe Gen4対応M.2 SSD「WD_BLACK SN850P NVMe SSD for PS5 consoles」 |
https://www.itmedia.co.jp/pcuser/articles/2307/03/news122.html
|
blacks |
2023-07-03 15:11:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] そごう・西武労組が異例のスト検討 池袋西武の家電量販店出店に懸念 |
https://www.itmedia.co.jp/business/articles/2307/03/news120.html
|
itmedia |
2023-07-03 15:03:00 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
condaのactivateになぜか失敗する |
https://qiita.com/shirayokomati/items/8e84193bc0613c87651d
|
conda |
2023-07-03 15:50:23 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
AtCoder で入茶するまでにしたこと |
https://qiita.com/Atta1n_/items/c6db4519a65a1f9b4956
|
atcoder |
2023-07-03 15:44:31 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
【初心者向け React×Flask】axiosでPostされた画像を処理するチュートリアル |
https://qiita.com/melonpass/items/ff7fbfbb7edad2e768e2
|
axios |
2023-07-03 15:41:33 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
Pythonからmysqlを操作する |
https://qiita.com/engishoma/items/ae1cff0425ec9b7a1424
|
orconnmysqlconnectorc |
2023-07-03 15:32:11 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
【初心者向け React×Flask】axiosでPostされた画像を処理するチュートリアル |
https://qiita.com/melonpass/items/ff7fbfbb7edad2e768e2
|
axios |
2023-07-03 15:41:33 |
Linux |
Ubuntuタグが付けられた新着投稿 - Qiita |
condaのactivateになぜか失敗する |
https://qiita.com/shirayokomati/items/8e84193bc0613c87651d
|
conda |
2023-07-03 15:50:23 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
パスワード(半角英数混合必須)のバリデーション |
https://qiita.com/shinyakoki/items/64e41f757a0e76f95c43
|
password |
2023-07-03 15:34:25 |
海外TECH |
DEV Community |
DRF-YASG: The Superhero of API Documentation - Saving Developers from Documentation Despair! |
https://dev.to/adii9/drf-yasg-the-superhero-of-api-documentation-saving-developers-from-documentation-despair-3jln
|
DRF YASG The Superhero of API Documentation Saving Developers from Documentation Despair In the midst of a migration project at my workplace where we are transitioning a web application from the NET framework to a Python React architecture we encountered a significant challenge that impeded our progress the absence of comprehensive and up to date API documentation As we started this technology stack migration it became increasingly crucial to understand the logic behind data point validation when developing APIs However the lack of accurate and up to date API documentation proved to be a major obstacle Throughout my years of experience I ve come to realize that maintaining APIs can be a daunting task It requires constant effort and attention to ensure they meet evolving business requirements and remain in sync with the ever changing technological landscape In my journey I have encountered several significant challenges that have tested my ability to effectively maintain APIs Let s explore these challenges ChallengesConsistency and AccuracyMaintaining consistency and accuracy in API documentation is crucial However it can be challenging to ensure that the documentation accurately reflects the current state of the API As updates and changes are made keeping the documentation in sync becomes a demanding task Handling API ChangesAs business needs evolve APIs must adapt accordingly Introducing changes to APIs while minimizing disruption to existing integrations can be intricate Properly communicating and managing these changes to minimize the impact on consumers of the API is vital Documentation ComplexityAPIs can have intricate workflows numerous endpoints and various input output parameters Documenting such complexity in a clear and concise manner can be demanding Striking the right balance between providing sufficient detail for developers while maintaining simplicity can be a significant challenge API Governance and SecurityEstablishing and maintaining proper API governance and security measures is essential to protect sensitive data and prevent unauthorized access Implementing secure authentication and authorization mechanisms managing access control and monitoring API usage require ongoing attention and vigilance In my quest to find better solutions for addressing the challenges of API maintenance I came across DRF YASG Django Rest Framework Yet Another Swagger Generator This powerful tool simplifies the process of generating and maintaining API documentation offering a comprehensive solution for tackling the challenges I previously faced Introduction What is DRF YASG DRF YASG short for Django Rest Framework Yet Another Swagger Generator is a remarkable tool that simplifies the process of generating and maintaining API documentation Specifically designed for Django Rest Framework DRF YASG automates the generation of interactive API documentation based on the OpenAPI specification formerly known as Swagger Why DRF YASG DRF YASG can serve as a single solution for all the challenges that I mentioned above Consistency and AccuracyDRF YASG simplifies the process of generating API documentation by automatically extracting information from Django Rest Framework s serializers views and viewsets This ensures that the documentation remains consistent with the actual implementation of the API reducing the risk of inconsistencies and inaccuracies Handling API ChangesDRF YASG automatically updates the API documentation when changes are made to the underlying Django Rest Framework codebase This helps in keeping the documentation in sync with the API s current state even when introducing changes such as adding or modifying endpoints parameters or response structures Documentation ComplexityDRF YASG generates interactive and user friendly documentation based on the OpenAPI specification formerly known as Swagger It handles the complexity of documenting intricate workflows endpoints and parameters providing a clear and intuitive interface for developers to understand and interact with the API API Governance and SecurityDRF YASG supports the integration of authentication and authorization mechanisms provided by Django Rest Framework making it easier to enforce API governance and security measures It enables the inclusion of authentication schemes permissions and access control details in the generated documentation promoting secure API usage Adding DRF YASG to Django Unlock the Swagger MagicStep Install DRF YASGStart by installing DRF YASG into your Django project You can do this using pip the Python package manager by running the following command pip install drf yasgStep Configure Django Rest FrameworkTo enable DRF YASG ensure that you have Django Rest Framework properly configured in your Django project This involves adding the necessary packages and settings to your settings py file You need to add DRF YASG in your installed apps in project s settings py file INSTALLED APPS Rest of Installed Apps drf yasg Step Include DRF YASG URLsNext you need to include DRF YASG URLs in your Django project s URL configuration Open your project s urls py file and add the following import statement at the top from drf yasg views import get schema viewfrom drf yasg import openapiThen create a schema view and configure it with your API information Add the following code to your urls py file schema view get schema view openapi Info title Your API Title default version v description Your API description terms of service contact openapi Contact email contact example com license openapi License name MIT License public True urlpatterns Your existing URL patterns path swagger schema view with ui swagger cache timeout name schema swagger ui path redoc schema view with ui redoc cache timeout name schema redoc Step Update your APIsIf you have a Django view function or a class based view representing your API endpoint You can add the swagger auto schema decorator above this view function or class to provide additional Swagger documentation swagger auto schema method post request body openapi Schema type openapi TYPE OBJECT properties name openapi Schema type openapi TYPE STRING email openapi Schema type openapi TYPE STRING required name email responses Created Bad Request api view POST def create user request Your implementation here passHere s what each argument in the decorator does method Specifies the HTTP method s for which the Swagger documentation should be generated In this case we set it to post to document the POST method request body Describes the request body schema for the API endpoint We define an object schema with two properties name and email both of type string We also specify that both properties are required responses Defines the expected responses for the API endpoint In this case we specify a response for a successful creation and a response for a bad request You can customize the request body and responsesaccording to your specific API endpoint requirements Step Accessing your swaggered APIs amp its docs Congratulations you have successfully swaggered up your APIs Now you can focus on developing the API end points and let DRF YASG take the task for documentation You can access the swagger UI from the endpoints you created in your urls py Below picture shows how the UI of the swaggerand the redoclooks like Swagger UI redoc UI Swagger UI provides a range of features and functionalities that allow you to interact with and explore APIs Here are some of the main things you can do in Swagger UI Browse API Endpoints Swagger UI presents a list of available API endpoints making it easy to navigate and find the desired endpoint View API Documentation Swagger UI displays detailed documentation for each API endpoint including the request parameters headers and response schemas Test API Calls You can make API calls directly from Swagger UI by entering the required parameters and executing the request The response is displayed within the interface Select HTTP Methods Swagger UI supports various HTTP methods GET POST PUT DELETE etc for API calls You can choose the appropriate method for each endpoint Provide Request Parameters Swagger UI allows you to enter the necessary parameters for an API call such as query parameters path parameters and request body data Configure Request Headers You can set custom headers for API requests such as authentication tokens or content types Handle Authentication Swagger UI provides options to handle authentication including basic authentication API key authentication or OAuth You can enter the required credentials or tokens for authenticated endpoints Handle Response Codes Swagger UI displays the possible response codes for each API call You can view the response code description and associated response schema View Request Examples Swagger UI can show request examples allowing you to see the expected structure and format of the request payload View Response Examples Swagger UI can display response examples showing sample responses based on the response schema Interact with Enumerated Values If an endpoint has enumerated values for certain parameters Swagger UI provides dropdowns or auto complete options to select the appropriate values Handle Pagination If an API supports pagination Swagger UI provides options to specify page size and navigate through the paginated results Save and Share Requests Swagger UI allows you to save and share API requests making it convenient for collaboration or documentation purposes Download API Definition Swagger UI provides options to download the OpenAPI Swagger specification file in JSON or YAML format for the API Search Functionality Swagger UI includes a search bar that lets you quickly search for specific endpoints parameters or operations within the API documentation Switch between API Versions If multiple versions of an API are documented Swagger UI allows you to switch between different versions to explore the endpoints specific to each version Conclusion In conclusion DRF YASG is an essential tool for documenting Django APIs Its integration with Django REST Framework and the ability to generate interactive API documentation using OpenAPI Swagger specifications make it a valuable asset for developers With DRF YASG you can save time create comprehensive documentation and enhance the overall developer experience of your API Thank you for reading If you have any questions or feedback about this article please don t hesitate to leave a comment I m always looking to improve and would love to hear from you Also if you enjoyed this content and would like to stay updated on future posts feel free to connect with me on LinkedIn and follow me on twitter and check out my Github profile |
2023-07-03 06:14:19 |
医療系 |
医療介護 CBnews |
これからの急性期充実体制加算の論点-先が見えない時代の戦略的病院経営(199) |
https://www.cbnews.jp/news/entry/20230630113742
|
千葉大学医学部附属病院 |
2023-07-03 15:50:00 |
金融 |
RSS FILE - 日本証券業協会 |
会長記者会見−2023年− |
https://www.jsda.or.jp/houdou/kaiken/kaiken_2023.html
|
記者会見 |
2023-07-03 06:30:00 |
金融 |
RSS FILE - 日本証券業協会 |
協会員の異動状況等 |
https://www.jsda.or.jp/kyoukaiin/kyoukaiin/kanyuu/index.html
|
異動 |
2023-07-03 06:10:00 |
金融 |
JPX マーケットニュース |
[JPX,東証]カーボン・クレジット市場の利用規約の公表及び参加者登録の開始について |
https://www.jpx.co.jp/news/2040/20230703-01.html
|
利用規約 |
2023-07-03 16:00:00 |
金融 |
JPX マーケットニュース |
[TOCOM]最終決済価格(2023年6月限):原油、電力 |
https://www.jpx.co.jp/markets/derivatives/special-quotation/index.html
|
tocom |
2023-07-03 15:15:00 |
金融 |
ニッセイ基礎研究所 |
妊娠・出産の高齢化が及ぼす生物学的な影響とは?-女性の初産年齢は6. 5歳も遅くなり、婦人科系疾患や不妊症のリスクが大幅に上昇、卵子・精子の劣化は子どもにも影響- |
https://www.nli-research.co.jp/topics_detail1/id=75270?site=nli
|
目次ーはじめにー婚姻年齢、妊娠・出産年齢の高齢化の現実ー平均初婚年齢の高齢化ー第子出産出生時の母親・父親の年齢の高齢化ー妊娠・出産年齢が遅れることによる女性への生物学的な影響ー女性ホルモンの長期的な曝露による婦人科系疾患の発現リスク増ー妊娠年齢の高齢化による妊孕性の限界から不妊症・不育症のリスク増ー高齢な母体が及ぼす妊娠合併症や分娩異常、産後の母体回復の遅延ー高齢出産を経た女性における子育てに伴う身体的・精神的負担の増加ー妊娠・出産年齢が遅れることによる子どもへの生物学的な影響ー卵子の劣化による染色体異常発生の増加ー精子の劣化による子どもの精神疾患や小児がんの発生に影響ーまとめ日本では年の出生数が万人を割り込み、若者の多くが結婚願望を有するものの、価値観の変容による未婚化、出会いの場・婚活機会の減少や経済的な課題等から晩婚化が進行している。 |
2023-07-03 15:48:00 |
金融 |
日本銀行:RSS |
令和5年6月29日からの大雨にかかる災害等に対する金融上の措置について(山口県) |
http://www.boj.or.jp/about/bcp/fso/fso230703a.pdf
|
Detail Nothing |
2023-07-03 16:00:00 |
ニュース |
BBC News - Home |
France teen's family tell BBC police use of lethal force must change |
https://www.bbc.co.uk/news/world-europe-66080505?at_medium=RSS&at_campaign=KARANGA
|
death |
2023-07-03 06:27:52 |
ニュース |
BBC News - Home |
The Ashes 2023: Australia spinner Nathan Lyon ruled out of Ashes with calf injury |
https://www.bbc.co.uk/sport/cricket/66084669?at_medium=RSS&at_campaign=KARANGA
|
The Ashes Australia spinner Nathan Lyon ruled out of Ashes with calf injuryAustralia spinner Nathan Lyon will miss the rest of the Ashes series against England with the calf injury he suffered in the second Test at Lord s |
2023-07-03 06:46:32 |
ニュース |
Newsweek |
マスクが「ブラジリアン柔術メダリスト」ザッカーバーグにガチファイトを提案...場所は「ベガス・オクタゴン」指定 |
https://www.newsweekjapan.jp/stories/world/2023/07/post-102072.php
|
マスクが「ブラジリアン柔術メダリスト」ザッカーバーグにガチファイトを提案場所は「ベガス・オクタゴン」指定メタのCEOマーク・ザッカーバーグとツイッターやテスラを率いるイーロン・マスクー米テック業界を代表する人の億万長者の対決に注目が集まっている。 |
2023-07-03 15:23:17 |
IT |
週刊アスキー |
シルバニアファミリーに会いに行こう! “横浜の街並み”のジオラマ展示など見どころたくさんの企画展、横浜人形の家で開催へ |
https://weekly.ascii.jp/elem/000/004/143/4143583/
|
会いに行こう |
2023-07-03 15:45:00 |
IT |
週刊アスキー |
西鉄ラッピング電車を運行! 福岡ソフトバンクホークスと西日本鉄道 |
https://weekly.ascii.jp/elem/000/004/143/4143575/
|
paypay |
2023-07-03 15:30:00 |
IT |
週刊アスキー |
ラーメン丼でかき氷を提供! 小田急百貨店SHINJUKU DELISH PARKに「埜庵」が特別出店 |
https://weekly.ascii.jp/elem/000/004/143/4143595/
|
shinjukudelishpark |
2023-07-03 15:15:00 |
IT |
週刊アスキー |
『FFXIV』で期間限定イベント「ゴールドソーサー・フェスティバル」が開催中! |
https://weekly.ascii.jp/elem/000/004/143/4143593/
|
ffxiv |
2023-07-03 15:10:00 |
IT |
週刊アスキー |
マイクロソフト、生成AIの基本を無料で学べる認定コースを公開 LinkedIn Learningと提携 |
https://weekly.ascii.jp/elem/000/004/143/4143585/
|
linkedinlearning |
2023-07-03 15:05:00 |
IT |
週刊アスキー |
サイボウズ、カスタマーサポートを担う子会社サイボウズ・コネクトシー設立 |
https://weekly.ascii.jp/elem/000/004/143/4143610/
|
製品 |
2023-07-03 15:45:00 |
IT |
週刊アスキー |
夏、到来。今年も「パインぱん」で常夏を感じたい! |
https://weekly.ascii.jp/elem/000/004/143/4143590/
|
期間限定 |
2023-07-03 15:40:00 |
IT |
週刊アスキー |
【餃子の王将】7月限定「台湾ラーメン」が登場! 醤油ベースであっさり旨辛 |
https://weekly.ascii.jp/elem/000/004/143/4143594/
|
台湾ラーメン |
2023-07-03 15:55:00 |
マーケティング |
AdverTimes |
生成AIで「広告ビジネスは、変われるか?」 マーケティング・メディア・クリエイティブの仕事に与える変化を予測する |
https://www.advertimes.com/20230703/article426127/
|
進展 |
2023-07-03 06:48:29 |
海外TECH |
reddit |
風俗店が現役女子大生だらけになっている理由。ソープランドの個室からオンライン授業に参加する嬢も… |
https://www.reddit.com/r/newsokuexp/comments/14pars1/風俗店が現役女子大生だらけになっている理由ソープランドの個室からオンライン授業に参加する嬢も/
|
ornewsokuexplinkcomments |
2023-07-03 06:13:56 |
コメント
コメントを投稿